Fix: possible use after free in consumer
authorDavid Goulet <dgoulet@efficios.com>
Mon, 26 May 2014 18:12:23 +0000 (14:12 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Mon, 26 May 2014 18:12:52 +0000 (14:12 -0400)
Fixes the coverity issue 1019959.

Signed-off-by: David Goulet <dgoulet@efficios.com>
src/common/consumer.c

index e80ac6be751fbba7eebc98404d520f9ea62c4cd5..86a34ddad86c452a4425d3d992d709c3fda5f07c 100644 (file)
@@ -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);
 
This page took 0.027058 seconds and 4 git commands to generate.