Blob Blame History Raw
From 70edf49e53c1a869330cfc97a41cbd954df95b6e Mon Sep 17 00:00:00 2001
From: Krutika Dhananjay <kdhananj@redhat.com>
Date: Wed, 16 Nov 2016 18:26:52 +0530
Subject: [PATCH 170/206] protocol/client: Fix iobref and iobuf leaks in
 COMPOUND fop

        Backport of: http://review.gluster.org/15860

Change-Id: Ia56a6a01ec73b934b30c90a333cf3dfa60a2df7c
BUG: 1393709
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/90421
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
---
 xlators/protocol/client/src/client-rpc-fops.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/xlators/protocol/client/src/client-rpc-fops.c b/xlators/protocol/client/src/client-rpc-fops.c
index 8085aec..a7b88ba 100644
--- a/xlators/protocol/client/src/client-rpc-fops.c
+++ b/xlators/protocol/client/src/client-rpc-fops.c
@@ -6158,7 +6158,6 @@ client3_3_compound (call_frame_t *frame, xlator_t *this, void *data)
         rsphdr->iov_len = iobuf_pagesize (rsphdr_iobuf);
         rsphdr_count = 1;
         rsphdr_iobuf = NULL;
-        rsphdr_iobref = NULL;
 
         req.compound_fop_enum = c_args->fop_enum;
         req.compound_req_array.compound_req_array_len = c_args->fop_length;
@@ -6208,6 +6207,8 @@ client3_3_compound (call_frame_t *frame, xlator_t *this, void *data)
 
         GF_FREE (req.xdata.xdata_val);
 
+        iobref_unref (rsphdr_iobref);
+
         compound_request_cleanup (&req);
         return 0;
 unwind:
-- 
2.9.3