[Gluster-users] Fwd: New Defects reported by Coverity Scan for GlusterFS
Lalatendu Mohanty
lmohanty at redhat.com
Thu Sep 11 07:36:29 UTC 2014
To fix these Coverity issues , please check the below link for guidelines:
http://www.gluster.org/community/documentation/index.php/Fixing_Issues_Reported_By_Tools_For_Static_Code_Analysis#Coverity
-------- Original Message --------
Subject: New Defects reported by Coverity Scan for GlusterFS
Date: Thu, 11 Sep 2014 00:02:11 -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 4 of 4 defect(s)
** CID 1238186: Logically dead code (DEADCODE)
/xlators/cluster/afr/src/afr-dir-write.c: 339 in afr_mark_new_entry_changelog()
** CID 1238185: Explicit null dereferenced (FORWARD_NULL)
/xlators/features/snapview-server/src/snapview-server-mgmt.c: 476 in svs_get_snapshot_list()
** CID 1238184: Explicit null dereferenced (FORWARD_NULL)
/xlators/features/snapview-server/src/snapview-server-mgmt.c: 115 in svs_mgmt_init()
** CID 1238183: Missing break in switch (MISSING_BREAK)
/xlators/mgmt/glusterd/src/glusterd-rebalance.c: 577 in glusterd_op_stage_rebalance()
________________________________________________________________________________________________________
*** CID 1238186: Logically dead code (DEADCODE)
/xlators/cluster/afr/src/afr-dir-write.c: 339 in afr_mark_new_entry_changelog()
333 break;
334 }
335
336 new_frame = NULL;
337 out:
338 if (changelog)
>>> CID 1238186: Logically dead code (DEADCODE)
>>> Execution cannot reach this statement "afr_matrix_cleanup(changelo...".
339 afr_matrix_cleanup (changelog, priv->child_count);
340 if (new_frame)
341 AFR_STACK_DESTROY (new_frame);
342 if (xattr)
343 dict_unref (xattr);
344 return;
________________________________________________________________________________________________________
*** CID 1238185: Explicit null dereferenced (FORWARD_NULL)
/xlators/features/snapview-server/src/snapview-server-mgmt.c: 476 in svs_get_snapshot_list()
470 if (frame_cleanup) {
471 /*
472 * Destroy the frame if we encountered an error
473 * Else we need to clean it up in
474 * mgmt_get_snapinfo_cbk
475 */
>>> CID 1238185: Explicit null dereferenced (FORWARD_NULL)
>>> Dereferencing null pointer "frame".
476 SVS_STACK_DESTROY (frame);
477 }
478
479 return ret;
________________________________________________________________________________________________________
*** CID 1238184: Explicit null dereferenced (FORWARD_NULL)
/xlators/features/snapview-server/src/snapview-server-mgmt.c: 115 in svs_mgmt_init()
109 ret = 0;
110
111 gf_log (this->name, GF_LOG_DEBUG, "svs mgmt init successful");
112
113 out:
114 if (ret) {
>>> CID 1238184: Explicit null dereferenced (FORWARD_NULL)
>>> Dereferencing null pointer "priv".
115 rpc_clnt_connection_cleanup (&priv->rpc->conn);
116 rpc_clnt_unref (priv->rpc);
117 priv->rpc = NULL;
118 }
119
120 return ret;
________________________________________________________________________________________________________
*** CID 1238183: Missing break in switch (MISSING_BREAK)
/xlators/mgmt/glusterd/src/glusterd-rebalance.c: 577 in glusterd_op_stage_rebalance()
571 "disconnect those clients before "
572 "attempting this command again.",
573 volname);
574 goto out;
575 }
576
>>> CID 1238183: Missing break in switch (MISSING_BREAK)
>>> The above case falls through to this one.
577 case GF_DEFRAG_CMD_START_FORCE:
578 if (is_origin_glusterd (dict)) {
579 op_ctx = glusterd_op_get_ctx ();
580 if (!op_ctx) {
581 ret = -1;
582 gf_log (this->name, GF_LOG_ERROR,
________________________________________________________________________________________________________
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-users/attachments/20140911/623a76aa/attachment.html>
More information about the Gluster-users
mailing list