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:51:40 +0000 (09:51 -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 d8150b6b15627cb2cee21adfabfd315e0a70bc63..9e4e5cd56713eb77659b72aa074140c6c51bfa4b 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.025241 seconds and 4 git commands to generate.