From: Jérémie Galarneau Date: Tue, 28 Aug 2018 16:15:03 +0000 (-0400) Subject: Fix: event leak during event load X-Git-Tag: v2.11.0-rc1~53 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=b33f872b72c7c01ded6bd7d0604d6aec7fa5721b;p=lttng-tools.git Fix: event leak during event load The currently processed lttng_event is now created using its constructor rather than allocating the structure on the function's stack. The destructor must thus be used. Reported-by: Coverity Scan (1395210 Resource leak) Signed-off-by: Jérémie Galarneau --- diff --git a/src/common/config/session-config.c b/src/common/config/session-config.c index 78d0c8b73..595e743b4 100644 --- a/src/common/config/session-config.c +++ b/src/common/config/session-config.c @@ -2052,6 +2052,7 @@ end: free(exclusions[i]); } + lttng_event_destroy(event); free(exclusions); free(filter_expression); return ret;