<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<div class="moz-forward-container"> Interested to fix Coverity
issues , please check the below link for how to and guidelines:<br>
<br>
<a class="moz-txt-link-freetext"
href="http://www.gluster.org/community/documentation/index.php/Fixing_Issues_Reported_By_Tools_For_Static_Code_Analysis#Coverity">http://www.gluster.org/community/documentation/index.php/Fixing_Issues_Reported_By_Tools_For_Static_Code_Analysis#Coverity</a><br>
<br>
Thanks,<br>
Lala<br>
<br>
-------- Original Message --------
<table class="moz-email-headers-table" border="0" cellpadding="0"
cellspacing="0">
<tbody>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">Subject:
</th>
<td>New Defects reported by Coverity Scan for GlusterFS</td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">Date: </th>
<td>Thu, 19 Jun 2014 02:01:18 -0700</td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">From: </th>
<td><a class="moz-txt-link-abbreviated" href="mailto:scan-admin@coverity.com">scan-admin@coverity.com</a></td>
</tr>
</tbody>
</table>
<br>
<br>
<pre>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, <a class="moz-txt-link-freetext" href="http://scan.coverity.com/projects/987?tab=overview">http://scan.coverity.com/projects/987?tab=overview</a>
To unsubscribe from the email notification for new defects, <a class="moz-txt-link-freetext" href="http://scan5.coverity.com/cgi-bin/unsubscribe.py">http://scan5.coverity.com/cgi-bin/unsubscribe.py</a>
</pre>
<br>
</div>
<br>
</body>
</html>