From 3eae1fb99c6821530888b470528299ff187021a8 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Tue, 12 Jul 2016 09:51:40 -0400 Subject: [PATCH] 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 --- liblttng-ust/lttng-ust-abi.c | 1 - 1 file changed, 1 deletion(-) 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; -- 2.34.1