From db501c73701b620be67b4c33ea16cac983dcd9b1 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Sun, 25 Mar 2012 22:48:09 +0530 Subject: core: fix all the iobuf related refs and unrefs reviewed the code against all the possible places where iobuf/iobref ref unref are present, and hopefully fixed most of the issues around memory leaks with respect to iobuf Change-Id: I9aa30326962991f8e23acedd389a0e962e097885 Signed-off-by: Amar Tumballi BUG: 797875 Reviewed-on: http://review.gluster.com/2994 Tested-by: Gluster Build System Reviewed-by: Jeff Darcy Reviewed-by: Vijay Bellur --- xlators/protocol/client/src/client.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'xlators/protocol/client/src/client.c') diff --git a/xlators/protocol/client/src/client.c b/xlators/protocol/client/src/client.c index 45d473fdbe7..9ce86b50900 100644 --- a/xlators/protocol/client/src/client.c +++ b/xlators/protocol/client/src/client.c @@ -258,7 +258,7 @@ client_submit_request (xlator_t *this, void *req, call_frame_t *frame, ret = 0; - if (new_iobref != NULL) + if (new_iobref) iobref_unref (new_iobref); if (iobuf) @@ -271,11 +271,11 @@ out: cbkfn (&rpcreq, NULL, 0, frame); - if (new_iobref != NULL) { + if (new_iobref) iobref_unref (new_iobref); - } - iobuf_unref (iobuf); + if (iobuf) + iobuf_unref (iobuf); return 0; } -- cgit