diff options
| author | Avra Sengupta <asengupt@redhat.com> | 2016-10-18 12:52:36 +0530 | 
|---|---|---|
| committer | Rajesh Joseph <rjoseph@redhat.com> | 2016-10-25 00:16:43 -0700 | 
| commit | 48a4c4e525665115f7e8c478d3bf51764427378d (patch) | |
| tree | 48b920d682695e888165e2d7e80c5671e35d5028 /xlators/mgmt/glusterd/src/glusterd-mgmt.c | |
| parent | a6b63e11b7758cf1bfcb67985e25ec02845f0995 (diff) | |
snapshot: Fix for memory leaks in snapshot code path
Change-Id: Idc2cb16574d166e3c0ee1f7c3a485f1acb19fc8c
BUG: 1386088
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/15668
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-mgmt.c')
| -rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-mgmt.c | 4 | 
1 files changed, 4 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-mgmt.c b/xlators/mgmt/glusterd/src/glusterd-mgmt.c index a5d22e4e265..85c98481042 100644 --- a/xlators/mgmt/glusterd/src/glusterd-mgmt.c +++ b/xlators/mgmt/glusterd/src/glusterd-mgmt.c @@ -1339,6 +1339,10 @@ out:          gd_mgmt_v3_collate_errors (args, op_ret, op_errno, rsp.op_errstr,                                    GLUSTERD_MGMT_V3_COMMIT, *peerid, rsp.uuid);          GF_FREE (peerid); + +        if (rsp.op_errstr) +                free (rsp.op_errstr); +          /* req->rpc_status set to -1 means, STACK_DESTROY will be called from           * the caller function.           */  | 
