From e41b82c5704b0a9caba7c511688c9a152c5f2b0f Mon Sep 17 00:00:00 2001 From: Raghavendra G Date: Tue, 31 Aug 2010 03:09:36 +0000 Subject: rpc-transport/rdma: free ioq entry even when churning of message fails. - An ioq entry is added to ioq-list only when it is not processed due to lack of quota. For all other cases, it should be freed to avoid memory leak. Signed-off-by: Raghavendra G Signed-off-by: Vijay Bellur BUG: 513 (Introduce 0 copy rdma) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=513 --- rpc/rpc-transport/rdma/src/rdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rpc') diff --git a/rpc/rpc-transport/rdma/src/rdma.c b/rpc/rpc-transport/rdma/src/rdma.c index 601c65df7a0..ceb4ee3f6b4 100644 --- a/rpc/rpc-transport/rdma/src/rdma.c +++ b/rpc/rpc-transport/rdma/src/rdma.c @@ -1679,7 +1679,7 @@ __rdma_ioq_churn_entry (rdma_peer_t *peer, rdma_ioq_t *entry) ret = __rdma_ioq_churn_reply (peer, entry, post); } - if (ret > 0) { + if (ret != 0) { __rdma_ioq_entry_free (entry); } } -- cgit