From: Mathieu Desnoyers Date: Wed, 15 May 2013 05:26:36 +0000 (+0200) Subject: Fix: memory leak for events without fields X-Git-Tag: v2.2.0-rc3~20 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=17ea789c184782cbfa5789c5e644a1774029dcb8;p=lttng-ust.git Fix: memory leak for events without fields Signed-off-by: Mathieu Desnoyers --- 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));