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:53:42 +0000 (09:53 -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 762c9017aca96bf35b9971a8dd3b63409f19f2e3..45ec1c776a33828dcbfbdb696182cd0e9cb291ee 100644 (file)
@@ -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;
This page took 0.026643 seconds and 4 git commands to generate.