From: Mathieu Desnoyers Date: Tue, 12 Jul 2016 13:51:40 +0000 (-0400) Subject: Fix: remove invalid free X-Git-Tag: v2.9.0-rc1~36 X-Git-Url: http://git.liburcu.org/?p=lttng-ust.git;a=commitdiff_plain;h=3eae1fb99c6821530888b470528299ff187021a8 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 d8150b6b..9e4e5cd5 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;