From: Jérémie Galarneau Date: Tue, 10 Sep 2019 17:44:26 +0000 (-0400) Subject: Clean-up: silence erroneous leak warning X-Git-Tag: v2.12.0-rc1~418 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=0359fdbc0ea4d96968e2ff493f713156d4646acb;p=lttng-tools.git Clean-up: silence erroneous leak warning Add an assert to validate that a newly created uevent is not enabled. If it was enabled at creation time, it would be leaked before it is published. Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/event.c b/src/bin/lttng-sessiond/event.c index b0b37bed7..0b612d2c6 100644 --- a/src/bin/lttng-sessiond/event.c +++ b/src/bin/lttng-sessiond/event.c @@ -190,6 +190,7 @@ int event_ust_enable_tracepoint(struct ltt_ust_session *usess, if (uevent->enabled) { /* It's already enabled so everything is OK */ + assert(!to_create); ret = LTTNG_ERR_UST_EVENT_ENABLED; goto end; }