summaryrefslogtreecommitdiffstats
path: root/xlators/nfs/lib
diff options
context:
space:
mode:
authorAnand Avati <avati@gluster.com>2011-03-01 14:49:59 +0000
committerAnand V. Avati <avati@dev.gluster.com>2011-03-01 13:23:19 -0800
commit63632c7b95d204cb077d999e32690a2cdcba1327 (patch)
treef1af0503e126685d3a5bb3d101d98374c8b2d02e /xlators/nfs/lib
parentf8ac2f645716847929f89ed218487f67db3e9f01 (diff)
rpcsvc: safe mem_put of req in nfs_rpcsvc_submit_vectors
Signed-off-by: Anand Avati <avati@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2481 (Crash in NFS) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2481
Diffstat (limited to 'xlators/nfs/lib')
-rw-r--r--xlators/nfs/lib/src/rpcsvc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/xlators/nfs/lib/src/rpcsvc.c b/xlators/nfs/lib/src/rpcsvc.c
index cd9733ecb6e..515e8738fc9 100644
--- a/xlators/nfs/lib/src/rpcsvc.c
+++ b/xlators/nfs/lib/src/rpcsvc.c
@@ -1783,6 +1783,7 @@ nfs_rpcsvc_submit_vectors (rpcsvc_request_t *req)
struct iobuf *replyiob = NULL;
struct iovec recordhdr = {0, };
rpcsvc_txbuf_t *rpctxb = NULL;
+ void *rxpool = NULL;
if ((!req) || (!req->conn))
return -1;
@@ -1818,11 +1819,13 @@ disconnect_exit:
* response to the ref that is performed on the conn when a request is
* handed to the RPC program.
*/
+ rxpool = req->conn->rxpool;
+
nfs_rpcsvc_conn_unref (req->conn);
if (ret == -1)
iobuf_unref (replyiob);
- mem_put (req->conn->rxpool, req);
+ mem_put (rxpool, req);
return ret;
}