From: Michael Vrable Date: Mon, 26 Apr 2010 05:38:27 +0000 (-0700) Subject: Fix a memory leak in the NFS-over-UDP code. X-Git-Url: http://git.vrable.net/?p=bluesky.git;a=commitdiff_plain;h=1fc8461814b84ef7eaa3436c1fd826e8c63c1537 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. --- 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); }