From: Mathieu Desnoyers Date: Tue, 12 Jul 2016 13:51:40 +0000 (-0400) Subject: Fix: remove invalid free X-Git-Tag: v2.8.2~15 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=06f1646ad90fd8c223f174ae14ee3d236771d1e0;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 762c9017..45ec1c77 100644 --- a/liblttng-ust/lttng-ust-abi.c +++ b/liblttng-ust/lttng-ust-abi.c @@ -513,7 +513,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;