summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-lib/src/rpc-transport.c
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2010-08-05 10:15:25 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-08-06 03:37:01 -0700
commitdc10948a186931f22df2b1d3b4053c0c6bcac1de (patch)
tree7db045a9fd4772b5f787d1278369bf7a1eb68b2d /rpc/rpc-lib/src/rpc-transport.c
parentf9f4c5722536faee3d9ecbd8b99ce138e724f401 (diff)
fix memory-leak in case of disconnections in RPC server
Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1227 (memory leak in rpcsvc_conn_alloc) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1227
Diffstat (limited to 'rpc/rpc-lib/src/rpc-transport.c')
-rw-r--r--rpc/rpc-lib/src/rpc-transport.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/rpc/rpc-lib/src/rpc-transport.c b/rpc/rpc-lib/src/rpc-transport.c
index 50379c14950..b8ef434503b 100644
--- a/rpc/rpc-lib/src/rpc-transport.c
+++ b/rpc/rpc-lib/src/rpc-transport.c
@@ -1171,6 +1171,8 @@ rpc_transport_destroy (rpc_transport_t *this)
GF_VALIDATE_OR_GOTO("rpc_transport", this, fail);
+ rpc_transport_disconnect (this);
+
if (this->fini)
this->fini (this);
pthread_mutex_destroy (&this->lock);