From: Mathieu Desnoyers Date: Wed, 23 Nov 2011 06:17:12 +0000 (+0100) Subject: Fix null pointer dereference when destroying a UST session with no channels X-Git-Tag: v2.0-pre15~85 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=f470a390fe7dca4ede0a5808426ff0467e5bd4d1;p=lttng-tools.git Fix null pointer dereference when destroying a UST session with no channels Signed-off-by: Mathieu Desnoyers --- diff --git a/lttng-sessiond/main.c b/lttng-sessiond/main.c index f63c35155..dd7ee0d4b 100644 --- a/lttng-sessiond/main.c +++ b/lttng-sessiond/main.c @@ -362,6 +362,8 @@ static void teardown_ust_session(struct ltt_session *session) DBG("Tearing down UST session(s)"); + if (!session->ust_session) + return; ret = ust_app_destroy_trace_all(session->ust_session); if (ret) { ERR("Error in ust_app_destroy_trace_all");