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.5.0-rc1~10 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=4f2e75b9bcd15f95b7c583e5656273b350895b22;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 cba4a605a..999e40005 100644 --- a/src/common/consumer.c +++ b/src/common/consumer.c @@ -1404,6 +1404,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);