From: David Goulet Date: Mon, 26 May 2014 18:12:23 +0000 (-0400) Subject: Fix: possible use after free in consumer X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=e75c3b320b6414a28b274e2e755904ea6b45f35a;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 aacabdb76..e11e46077 100644 --- a/src/common/consumer.c +++ b/src/common/consumer.c @@ -1308,6 +1308,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);