diff options
author | Atin Mukherjee <amukherj@redhat.com> | 2019-04-24 22:02:51 +0530 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2019-04-25 06:39:16 +0000 |
commit | c827682e4df44ec6aaae3780c325568fb43053ff (patch) | |
tree | ac7ddc6c908f18f9c163dbd19302d6274b7111d3 /xlators/mgmt/glusterd/src/glusterd-volgen.c | |
parent | 647e2d3a9fbe36f2fbf062feda53b7cb6aa4830b (diff) |
glusterd: coverity fixes
Addresses the following:
* CID 1124776: Resource leaks (RESOURCE_LEAK) - Variable "aa" going out
of scope leaks the storage it points to in glusterd-volgen.c
* Bunch of CHECKED_RETURN defects in the callers of synctask_barrier_init
* CID 1400755: Error handling issues (CHECKED_RETURN) - Calling
"gf_is_service_running" without checking return value in
xlators/mgmt/glusterd/src/glusterd-shd-svc.c: 671 in
glusterd_shdsvc_stop()
* CID 1400745: Memory - illegal accesses (USE_AFTER_FREE) - Dereferencing
freed pointer "volinfo" in /xlators/mgmt/glusterd/src/glusterd-shd-svc.c: 460 in glusterd_shdsvc_start()
* CID 1400742: Program hangs (LOCK) - adding annotation to fix this
false positive
Updates: bz#789278
Change-Id: I02f16e7eeb8c5cf72f7d0b29d00df4f03b3718b3
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-volgen.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volgen.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c index 493edb101b6..69298adc8cb 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volgen.c +++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c @@ -4726,9 +4726,10 @@ nfs_option_handler(volgen_graph_t *graph, struct volopt_map_entry *vme, if (ret != -1) { ret = gf_canonicalize_path(vme->value); - if (ret) + if (ret) { + GF_FREE(aa); return -1; - + } ret = xlator_set_option(xl, aa, ret, vme->value); GF_FREE(aa); } |