From 1fc8461814b84ef7eaa3436c1fd826e8c63c1537 Mon Sep 17 00:00:00 2001 From: Michael Vrable Date: Sun, 25 Apr 2010 22:38:27 -0700 Subject: [PATCH] Fix a memory leak in the NFS-over-UDP code. The TCP code still has a per-connection leak, but at least this should help with the UDP per-request leak. --- nfs3/rpc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nfs3/rpc.c b/nfs3/rpc.c index 5341f20..f753bd1 100644 --- a/nfs3/rpc.c +++ b/nfs3/rpc.c @@ -173,6 +173,7 @@ async_rpc_send_failure(RPCRequest *req, enum accept_stat stat) /* For UDP, a connection only exists for the duration of a single * message. */ g_mutex_free(req->connection->send_lock); + g_string_free(req->connection->msgbuf, TRUE); g_string_free(req->connection->sendbuf, TRUE); g_free(req->connection); } @@ -250,6 +251,7 @@ async_rpc_send_reply(RPCRequest *req, void *result) /* For UDP, a connection only exists for the duration of a single * message. */ g_mutex_free(req->connection->send_lock); + g_string_free(req->connection->msgbuf, TRUE); g_string_free(req->connection->sendbuf, TRUE); g_free(req->connection); } -- 2.20.1