From: Jérémie Galarneau Date: Sat, 6 May 2017 18:31:22 +0000 (-0400) Subject: Fix: memory leak of client_list_element X-Git-Tag: v2.11.0-rc1~610 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=4fb43b68c1822cc7619907070489d3d678c41e7a Fix: memory leak of client_list_element 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 --- 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; }