From: David Goulet Date: Mon, 22 Sep 2014 15:05:06 +0000 (-0400) Subject: Fix: memory leak in load session thread X-Git-Tag: v2.6.0-rc1~49 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=eca3ba250398d7ea7aecb6b0f397c6bb1cbad227;p=lttng-tools.git Fix: memory leak in load session thread Fixes Coverity issue 1213789. Signed-off-by: David Goulet --- diff --git a/src/bin/lttng-sessiond/load-session-thread.c b/src/bin/lttng-sessiond/load-session-thread.c index 38fa1f616..868d7c552 100644 --- a/src/bin/lttng-sessiond/load-session-thread.c +++ b/src/bin/lttng-sessiond/load-session-thread.c @@ -51,7 +51,7 @@ void load_session_destroy_data(struct load_session_thread_data *data) int load_session_init_data(struct load_session_thread_data **data) { int ret; - struct load_session_thread_data *_data; + struct load_session_thread_data *_data = NULL; assert(data); @@ -75,6 +75,7 @@ int load_session_init_data(struct load_session_thread_data **data) return 0; error: + free(_data); return -1; }