summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaiki Ueno <dueno@redhat.com>2016-09-21 15:06:41 +0200
committerDaiki Ueno <ueno@gnu.org>2016-10-31 12:59:17 +0100
commit7e94bcac88e16c22b8258bcdcb4b2165b198679a (patch)
treede84bf38573b2c6896f8f9bfcd6435feb91db396
parent07cadc6fd3716f1b2a8265c40b59426847042967 (diff)
rpc: Fix memleak in rpc_socket cleanup
GCC's asan spotted this: Direct leak of 120 byte(s) in 1 object(s) allocated from: #0 0x7f8d4f221fe0 in calloc (/lib64/libasan.so.3+0xc6fe0) #1 0x427f55 in rpc_socket_new ../p11-kit/rpc-transport.c:100 #2 0x42bc1b in rpc_exec_connect ../p11-kit/rpc-transport.c:767
-rw-r--r--p11-kit/rpc-transport.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/p11-kit/rpc-transport.c b/p11-kit/rpc-transport.c
index 5251e11..13d1372 100644
--- a/p11-kit/rpc-transport.c
+++ b/p11-kit/rpc-transport.c
@@ -163,6 +163,7 @@ rpc_socket_unref (rpc_socket *sock)
rpc_socket_close (sock);
p11_mutex_uninit (&sock->write_lock);
p11_mutex_uninit (&sock->read_lock);
+ free (sock);
}
static bool