diff options
author | Vijay Bellur <vbellur@redhat.com> | 2018-08-21 22:16:07 -0700 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2018-08-23 09:28:23 +0000 |
commit | 4d3be307293b63c74398dfa715e9920cf356f083 (patch) | |
tree | 1c8dedb3809312113e5a58e8163fb8bc6ab8bfe2 /xlators/mgmt/glusterd | |
parent | 5ab6e2ce11cad6034f4209ffc63c110951fd647a (diff) |
mgmt/glusterd: Fix memory leaks in glusterd-handler.c
Addresses the following CIDs:
1370941: Unconditional memory leak in glusterd_print_snapinfo_by_vol()
1370943: Memory leak when opendir fails for output directory in
glusterd_get_state()
Change-Id: I9536841629e1ffe1fed79a8e57d266a0e953e5af
updates: bz#789278
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-handler.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c index 656e405c01a..8dd60dec517 100644 --- a/xlators/mgmt/glusterd/src/glusterd-handler.c +++ b/xlators/mgmt/glusterd/src/glusterd-handler.c @@ -5136,7 +5136,7 @@ glusterd_print_snapinfo_by_vol (FILE *fp, glusterd_volinfo_t *volinfo, int volco fprintf (fp, "Volume%d.snapshot%d.name: %s\n", volcount, snapcount, snapinfo->snapname); fprintf (fp, "Volume%d.snapshot%d.id: %s\n", volcount, snapcount, - gf_strdup (uuid_utoa (snapinfo->snap_id))); + uuid_utoa (snapinfo->snap_id)); fprintf (fp, "Volume%d.snapshot%d.time: %s\n", volcount, snapcount, timestr); @@ -5401,6 +5401,7 @@ glusterd_get_state (rpcsvc_request_t *req, dict_t *dict) GD_MSG_DICT_GET_FAILED, "%s", err_str); } + GF_FREE (odir); ret = -1; goto out; } |