summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorVijay Bellur <vbellur@redhat.com>2018-08-13 14:52:09 -0700
committerAtin Mukherjee <amukherj@redhat.com>2018-08-23 16:43:49 +0000
commit11a9f9f0dcca58446f306ef2060a345348ed91c1 (patch)
tree4a4c68e287e9a89ae0a5c03f56b16fb368f4b020 /xlators
parent370f05546eeedab394ca0d333a6ca6637757f1e3 (diff)
mgmt/glusterd: Fix resource leak & unused value issues in glusterd-volume-ops.c
Addresses CID: 1274132, 1325534 Change-Id: I176612ef5baf5618d543838a5f32db7dcd7002c3 updates: bz#789278 Signed-off-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volume-ops.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
index a02b0cb7571..030006b5459 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
@@ -197,6 +197,7 @@ glusterd_check_brick_order(dict_t *dict, char *err_str)
gf_msg (this->name, GF_LOG_ERROR, ENOMEM,
GD_MSG_NO_MEMORY, "failed to allocate "
"memory");
+ freeaddrinfo (ai_info);
goto out;
}
ai_list_tmp1->info = ai_info;
@@ -2290,6 +2291,8 @@ glusterd_op_create_volume (dict_t *dict, char **op_errstr)
"replica count for volume %s", volname);
goto out;
}
+
+ /* coverity[unused_value] arbiter count is optional */
ret = dict_get_int32 (dict, "arbiter-count",
&volinfo->arbiter_count);
} else if (GF_CLUSTER_TYPE_STRIPE == volinfo->type) {
@@ -2335,6 +2338,8 @@ glusterd_op_create_volume (dict_t *dict, char **op_errstr)
"replica count for volume %s", volname);
goto out;
}
+
+ /* coverity[unused_value] arbiter count is optional */
ret = dict_get_int32 (dict, "arbiter-count",
&volinfo->arbiter_count);
} else if (GF_CLUSTER_TYPE_DISPERSE == volinfo->type) {