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/?p=lttng-tools.git;a=commitdiff_plain;h=b33f872b72c7c01ded6bd7d0604d6aec7fa5721b;hp=76fcf15156ecb0a18f9c41b350342171f862ff47 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;