[Gluster-devel] Fwd: New Defects reported by Coverity Scan for GlusterFS
Lalatendu Mohanty
lmohanty at redhat.com
Thu Jun 19 09:07:52 UTC 2014
Interested to fix Coverity issues , please check the below link for how
to and guidelines:
http://www.gluster.org/community/documentation/index.php/Fixing_Issues_Reported_By_Tools_For_Static_Code_Analysis#Coverity
Thanks,
Lala
-------- Original Message --------
Subject: New Defects reported by Coverity Scan for GlusterFS
Date: Thu, 19 Jun 2014 02:01:18 -0700
From: scan-admin at coverity.com
Hi,
Please find the latest report on new defect(s) introduced to GlusterFS found with Coverity Scan.
Defect(s) Reported-by: Coverity Scan
Showing 1 of 1 defect(s)
** CID 1223229: Dereference after null check (FORWARD_NULL)
/xlators/cluster/dht/src/dht-layout.c: 728 in dht_layout_dir_mismatch()
/xlators/cluster/dht/src/dht-layout.c: 739 in dht_layout_dir_mismatch()
/xlators/cluster/dht/src/dht-layout.c: 752 in dht_layout_dir_mismatch()
/xlators/cluster/dht/src/dht-layout.c: 764 in dht_layout_dir_mismatch()
________________________________________________________________________________________________________
*** CID 1223229: Dereference after null check (FORWARD_NULL)
/xlators/cluster/dht/src/dht-layout.c: 728 in dht_layout_dir_mismatch()
722 pos = idx;
723 break;
724 }
725 }
726
727 if (pos == -1) {
>>> CID 1223229: Dereference after null check (FORWARD_NULL)
>>> Dereferencing null pointer "loc".
728 gf_msg_debug (this->name, 0,
729 "%s - no layout info for subvolume %s",
730 loc->path, subvol->name);
731 ret = 1;
732 goto out;
733 }
/xlators/cluster/dht/src/dht-layout.c: 739 in dht_layout_dir_mismatch()
733 }
734
735 err = layout->list[pos].err;
736
737 if (!xattr) {
738 if (err == 0) {
>>> CID 1223229: Dereference after null check (FORWARD_NULL)
>>> Dereferencing null pointer "loc".
739 gf_log (this->name, GF_LOG_INFO,
740 "%s: xattr dictionary is NULL",
741 loc->path);
742 ret = -1;
743 }
744 goto out;
/xlators/cluster/dht/src/dht-layout.c: 752 in dht_layout_dir_mismatch()
746
747 dict_ret = dict_get_ptr (xattr, conf->xattr_name,
748 &disk_layout_raw);
749
750 if (dict_ret < 0) {
751 if (err == 0 && layout->list[pos].stop) {
>>> CID 1223229: Dereference after null check (FORWARD_NULL)
>>> Dereferencing null pointer "loc".
752 gf_log (this->name, GF_LOG_INFO,
753 "%s: Disk layout missing, gfid = %s",
754 loc->path, gfid);
755 ret = -1;
756 }
757 goto out;
/xlators/cluster/dht/src/dht-layout.c: 764 in dht_layout_dir_mismatch()
758 }
759
760 memcpy (disk_layout, disk_layout_raw, sizeof (disk_layout));
761
762 count = ntoh32 (disk_layout[0]);
763 if (count != 1) {
>>> CID 1223229: Dereference after null check (FORWARD_NULL)
>>> Dereferencing null pointer "loc".
764 gf_msg (this->name, GF_LOG_ERROR, 0,
765 DHT_MSG_INVALID_DISK_LAYOUT,
766 "Invalid disk layout: invalid count %d,"
767 "path = %s, gfid = %s ", count, loc->path, gfid);
768 ret = -1;
769 goto out;
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, http://scan.coverity.com/projects/987?tab=overview
To unsubscribe from the email notification for new defects, http://scan5.coverity.com/cgi-bin/unsubscribe.py
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://supercolony.gluster.org/pipermail/gluster-devel/attachments/20140619/9b209517/attachment.html>
More information about the Gluster-devel
mailing list