summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c
diff options
context:
space:
mode:
authorSunny Kumar <sunkumar@redhat.com>2018-08-07 19:02:48 +0530
committerAmar Tumballi <amarts@redhat.com>2018-08-28 05:46:29 +0000
commitdcacaf15ec361a6f8bf79037ff47c2a8759b7170 (patch)
treedb2aecac6aaae4b72cd7eeff0a61dfee9f9e6849 /xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c
parentb76a84be697074e4132120200320671d87f815ae (diff)
snapshot : fix few coverity issues in glusterd-snapshot-utils.c
This patch fixes CID 1210987 and 1351650. Change-Id: Ic85bc6048651146a79fe68add19dcc095738a517 updates: bz#789278 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c b/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c
index fcfcdb669e1..a9f49e19720 100644
--- a/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c
@@ -3074,6 +3074,7 @@ glusterd_snap_common_quorum_calculate (glusterd_volinfo_t *volinfo,
this = THIS;
GF_ASSERT (this);
GF_VALIDATE_OR_GOTO (this->name, op_errno, out);
+ GF_VALIDATE_OR_GOTO (this->name, volinfo, out);
/* for replicate volumes with replica count equal to or
greater than 3, do quorum check by getting what type
@@ -3275,7 +3276,7 @@ glusterd_snap_quorum_check_for_clone (dict_t *dict, gf_boolean_t snap_volume,
if (ret) {
gf_msg (this->name, GF_LOG_WARNING, 0,
GD_MSG_VOL_NOT_FOUND, "volume %s "
- "is not in quorum", volinfo->volname);
+ "is not in quorum", volname);
goto out;
}
}
@@ -3990,7 +3991,7 @@ glusterd_restore_geo_rep_files (glusterd_volinfo_t *snap_vol)
}
out:
if (origin_volname)
- GF_ASSERT (origin_volname);
+ GF_FREE (origin_volname);
return ret;
}