From 17ea789c184782cbfa5789c5e644a1774029dcb8 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Wed, 15 May 2013 07:26:36 +0200 Subject: [PATCH] Fix: memory leak for events without fields Signed-off-by: Mathieu Desnoyers --- liblttng-ust-comm/lttng-ust-comm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/liblttng-ust-comm/lttng-ust-comm.c b/liblttng-ust-comm/lttng-ust-comm.c index 5321922d..b0e4484a 100644 --- a/liblttng-ust-comm/lttng-ust-comm.c +++ b/liblttng-ust-comm/lttng-ust-comm.c @@ -1062,6 +1062,8 @@ int ustcomm_register_channel(int sock, if (len < 0) { return len; } + } else { + free(fields); } len = ustcomm_recv_unix_sock(sock, &reply, sizeof(reply)); -- 2.34.1