Fix: remove invalid free
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 12 Jul 2016 13:51:40 +0000 (09:51 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 12 Jul 2016 13:54:02 +0000 (09:54 -0400)
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 <aravind.ht@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
liblttng-ust/lttng-ust-abi.c

index c5cc42b727c107a26d1466cea45227072643aa0c..c8479960d7c635772b01eb0200d0b4c972bbe7ee 100644 (file)
@@ -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;
This page took 0.0265 seconds and 4 git commands to generate.