From: Mathieu Desnoyers Date: Tue, 12 Jul 2016 13:51:40 +0000 (-0400) Subject: Fix: remove invalid free X-Git-Tag: v2.7.5~14 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=cb5925aaaf0950d2a14dd36da7e65b4049c18743;p=lttng-ust.git Fix: remove invalid free On this error path, we should not free lttng_chan, because it is located within an allocated shm memory area associated with the channel now. It is invalid to free this pointer. This is invoked on a channel creation error path. Reported-by: Aravind HT Signed-off-by: Mathieu Desnoyers --- diff --git a/liblttng-ust/lttng-ust-abi.c b/liblttng-ust/lttng-ust-abi.c index c5cc42b7..c8479960 100644 --- a/liblttng-ust/lttng-ust-abi.c +++ b/liblttng-ust/lttng-ust-abi.c @@ -512,7 +512,6 @@ int lttng_abi_map_channel(int session_objd, /* error path after channel was created */ objd_error: notransport: - free(lttng_chan); alloc_error: channel_destroy(chan, channel_handle, 0); return ret;