Fix: path leak on formatting error
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 20 Aug 2018 19:17:05 +0000 (15:17 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 20 Aug 2018 19:17:05 +0000 (15:17 -0400)
'tmp_path' is leaked if 'snprintf()' reports an error.

Reported-by: Coverity Scan (1387044 Resource leak)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/ust-app.c

index 160f567c89b5c3ca755ef0735233c6b3a436a1d5..5cf90493947f4de46d9a4738e6cf640ba98fedcf 100644 (file)
@@ -4446,6 +4446,7 @@ int ust_app_start_trace(struct ltt_ust_session *usess, struct ust_app *app)
                                        usess->consumer->dst.session_root_path,
                                        usess->consumer->chunk_path,
                                        usess->consumer->subdir);
+                       free(tmp_path);
                        goto error_unlock;
                }
 
This page took 0.028839 seconds and 4 git commands to generate.