summaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorNiels de Vos <ndevos@redhat.com>2017-10-09 18:58:09 +0200
committerRaghavendra G <rgowdapp@redhat.com>2017-10-11 04:55:31 +0000
commitec39ca32d942d49fd701156174abbba0b73bce2f (patch)
treea7c9691e0399a5b2721c16289c572ecfd239ff07 /rpc
parent6628b9426918010d203a7de19e3e187eeb077b0d (diff)
rpc: free registered callback programs
Change-Id: I8c6f6b642f025d1faf74015b8f7aaecd7ebfd4d5 BUG: 1443145 Signed-off-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'rpc')
-rw-r--r--rpc/rpc-lib/src/rpc-clnt.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/rpc/rpc-lib/src/rpc-clnt.c b/rpc/rpc-lib/src/rpc-clnt.c
index e34d2ca47ac..1ea80991ebe 100644
--- a/rpc/rpc-lib/src/rpc-clnt.c
+++ b/rpc/rpc-lib/src/rpc-clnt.c
@@ -1771,6 +1771,9 @@ rpc_clnt_trigger_destroy (struct rpc_clnt *rpc)
static void
rpc_clnt_destroy (struct rpc_clnt *rpc)
{
+ rpcclnt_cb_program_t *program = NULL;
+ rpcclnt_cb_program_t *tmp = NULL;
+
if (!rpc)
return;
@@ -1783,6 +1786,10 @@ rpc_clnt_destroy (struct rpc_clnt *rpc)
mem_pool_destroy (rpc->reqpool);
mem_pool_destroy (rpc->saved_frames_pool);
+ list_for_each_entry_safe (program, tmp, &rpc->programs, program) {
+ GF_FREE (program);
+ }
+
GF_FREE (rpc);
return;
}