From 11dd59b788334fe2de1653ae85395986ba531606 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Mon, 24 Jan 2011 20:35:44 +0000 Subject: rpc: handle proper 'ref', 'unref' of transport from rpc-clnt Signed-off-by: Amar Tumballi Signed-off-by: Anand V. Avati BUG: 2250 ([glusterfs-3.1.2qa2]: SegFault in rpc-clnt.c) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2250 --- rpc/rpc-lib/src/rpc-transport.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'rpc/rpc-lib/src/rpc-transport.c') diff --git a/rpc/rpc-lib/src/rpc-transport.c b/rpc/rpc-lib/src/rpc-transport.c index bf0e4dfd6e9..249c9398f79 100644 --- a/rpc/rpc-lib/src/rpc-transport.c +++ b/rpc/rpc-lib/src/rpc-transport.c @@ -1124,7 +1124,8 @@ rpc_transport_unref (rpc_transport_t *this) pthread_mutex_unlock (&this->lock); if (refcount == 0) { - this->notify (this, this->mydata, RPC_TRANSPORT_CLEANUP, NULL); + if (this->mydata) + this->notify (this, this->mydata, RPC_TRANSPORT_CLEANUP, NULL); rpc_transport_destroy (this); } -- cgit