From 4f2e75b9bcd15f95b7c583e5656273b350895b22 Mon Sep 17 00:00:00 2001 From: David Goulet Date: Mon, 26 May 2014 14:12:23 -0400 Subject: [PATCH] Fix: possible use after free in consumer Fixes the coverity issue 1019959. Signed-off-by: David Goulet --- src/common/consumer.c | 4 ++++ 1 file changed, 4 insertions(+) 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); -- 2.34.1