From b33f872b72c7c01ded6bd7d0604d6aec7fa5721b Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Tue, 28 Aug 2018 12:15:03 -0400 Subject: [PATCH 1/1] Fix: event leak during event load MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/common/config/session-config.c | 1 + 1 file changed, 1 insertion(+) 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; -- 2.34.1