From 4fb43b68c1822cc7619907070489d3d678c41e7a Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Sat, 6 May 2017 14:31:22 -0400 Subject: [PATCH] Fix: memory leak of client_list_element MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reported-by: Coverity Scan CID 1374799: Resource leaks (RESOURCE_LEAK) Variable "client_list_element" going out of scope leaks the storage it points to. Signed-off-by: Jérémie Galarneau --- src/bin/lttng-sessiond/notification-thread-events.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bin/lttng-sessiond/notification-thread-events.c b/src/bin/lttng-sessiond/notification-thread-events.c index 00a2bf66f..8bc020f96 100644 --- a/src/bin/lttng-sessiond/notification-thread-events.c +++ b/src/bin/lttng-sessiond/notification-thread-events.c @@ -405,6 +405,7 @@ int notification_thread_client_subscribe(struct notification_client *client, &iter); node = cds_lfht_iter_get_node(&iter); if (!node) { + free(client_list_element); goto end_unlock; } -- 2.34.1