From: David Goulet Date: Mon, 26 May 2014 18:12:23 +0000 (-0400) Subject: Fix: possible use after free in consumer X-Git-Tag: v2.4.2~15 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=28d77b5cb820e19e4a233808132183c6212a1cc1;p=lttng-tools.git Fix: possible use after free in consumer Fixes the coverity issue 1019959. Signed-off-by: David Goulet --- diff --git a/src/common/consumer.c b/src/common/consumer.c index e80ac6be7..86a34ddad 100644 --- a/src/common/consumer.c +++ b/src/common/consumer.c @@ -1403,6 +1403,10 @@ void lttng_consumer_destroy(struct lttng_consumer_local_data *ctx) DBG("Consumer destroying it. Closing everything."); + if (!ctx) { + return; + } + destroy_data_stream_ht(data_ht); destroy_metadata_stream_ht(metadata_ht);