|
|
e7a346 |
From 9c1ddc2e32cbfc8ad313b4f1342fbc20e49af80b Mon Sep 17 00:00:00 2001
|
|
|
e7a346 |
From: Niels de Vos <ndevos@redhat.com>
|
|
|
e7a346 |
Date: Mon, 9 Oct 2017 18:58:09 +0200
|
|
|
e7a346 |
Subject: [PATCH 331/333] rpc: free registered callback programs
|
|
|
e7a346 |
|
|
|
e7a346 |
> Change-Id: I8c6f6b642f025d1faf74015b8f7aaecd7ebfd4d5
|
|
|
e7a346 |
> BUG: 1443145
|
|
|
e7a346 |
> Signed-off-by: Niels de Vos <ndevos@redhat.com>
|
|
|
e7a346 |
> (cherry picked from commit ec39ca32d942d49fd701156174abbba0b73bce2f)
|
|
|
e7a346 |
> (Reviewed on upstream link https://review.gluster.org/#/c/18478)
|
|
|
e7a346 |
|
|
|
e7a346 |
Change-Id: I23e44507d12326bf63c96c56eae83d5424f8ee63
|
|
|
e7a346 |
BUG: 1600790
|
|
|
e7a346 |
Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
|
|
|
e7a346 |
Reviewed-on: https://code.engineering.redhat.com/gerrit/145358
|
|
|
e7a346 |
Reviewed-by: Niels de Vos <ndevos@redhat.com>
|
|
|
e7a346 |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
e7a346 |
---
|
|
|
e7a346 |
rpc/rpc-lib/src/rpc-clnt.c | 7 +++++++
|
|
|
e7a346 |
1 file changed, 7 insertions(+)
|
|
|
e7a346 |
|
|
|
e7a346 |
diff --git a/rpc/rpc-lib/src/rpc-clnt.c b/rpc/rpc-lib/src/rpc-clnt.c
|
|
|
e7a346 |
index e34d2ca..1ea8099 100644
|
|
|
e7a346 |
--- a/rpc/rpc-lib/src/rpc-clnt.c
|
|
|
e7a346 |
+++ b/rpc/rpc-lib/src/rpc-clnt.c
|
|
|
e7a346 |
@@ -1771,6 +1771,9 @@ rpc_clnt_trigger_destroy (struct rpc_clnt *rpc)
|
|
|
e7a346 |
static void
|
|
|
e7a346 |
rpc_clnt_destroy (struct rpc_clnt *rpc)
|
|
|
e7a346 |
{
|
|
|
e7a346 |
+ rpcclnt_cb_program_t *program = NULL;
|
|
|
e7a346 |
+ rpcclnt_cb_program_t *tmp = NULL;
|
|
|
e7a346 |
+
|
|
|
e7a346 |
if (!rpc)
|
|
|
e7a346 |
return;
|
|
|
e7a346 |
|
|
|
e7a346 |
@@ -1783,6 +1786,10 @@ rpc_clnt_destroy (struct rpc_clnt *rpc)
|
|
|
e7a346 |
mem_pool_destroy (rpc->reqpool);
|
|
|
e7a346 |
mem_pool_destroy (rpc->saved_frames_pool);
|
|
|
e7a346 |
|
|
|
e7a346 |
+ list_for_each_entry_safe (program, tmp, &rpc->programs, program) {
|
|
|
e7a346 |
+ GF_FREE (program);
|
|
|
e7a346 |
+ }
|
|
|
e7a346 |
+
|
|
|
e7a346 |
GF_FREE (rpc);
|
|
|
e7a346 |
return;
|
|
|
e7a346 |
}
|
|
|
e7a346 |
--
|
|
|
e7a346 |
1.8.3.1
|
|
|
e7a346 |
|