Patchwork [BUG:1517] glusterfsd: destroy mgmt in cleanup

login
register
Submitter Pranith K
Date 2010-09-23 04:12:51
Message ID <20100923041251.GA6574@dev.gluster.com>
Download mbox | patch
Permalink /patch/4936/
State Accepted
Headers show

Comments

Pranith K - 2010-09-23 04:12:51
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
---
 glusterfsd/src/glusterfsd.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

Patch

diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c
index ab0f323..e383f96 100644
--- a/glusterfsd/src/glusterfsd.c
+++ b/glusterfsd/src/glusterfsd.c
@@ -73,6 +73,7 @@ 
 #include "syscall.h"
 #include "call-stub.h"
 #include <fnmatch.h>
+#include "rpc-clnt.h"
 
 #ifdef GF_DARWIN_HOST_OS
 #include "daemon.h"
@@ -644,6 +645,8 @@  cleanup_and_exit (int signum)
 
         /* TODO: is this the right place? */
         glusterfs_mgmt_pmap_signout (ctx);
+        if (ctx && ctx->mgmt)
+                rpc_clnt_destroy (ctx->mgmt);
 
         gf_log ("glusterfsd", GF_LOG_NORMAL, "shutting down");