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.10.0-rc2~89 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=c3dce007e6c57337c8e3060702aab15e3d789795;p=lttng-tools.git 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; }