From e64207cf612a1e1a34131427b7cea17ce82ea091 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Wed, 17 Dec 2014 20:45:14 -0500 Subject: [PATCH] Fix: ust app leak on UST buffer creation error MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Mathieu Desnoyers Signed-off-by: Jérémie Galarneau --- src/bin/lttng-sessiond/ust-app.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bin/lttng-sessiond/ust-app.c b/src/bin/lttng-sessiond/ust-app.c index 9dbd49bc3..3abd12716 100644 --- a/src/bin/lttng-sessiond/ust-app.c +++ b/src/bin/lttng-sessiond/ust-app.c @@ -1875,6 +1875,7 @@ static int create_ust_app_session(struct ltt_ust_session *usess, /* Init local registry. */ ret = setup_buffer_reg_pid(ua_sess, app, NULL); if (ret < 0) { + delete_ust_app_session(-1, ua_sess, app); goto error; } break; @@ -1882,6 +1883,7 @@ static int create_ust_app_session(struct ltt_ust_session *usess, /* Look for a global registry. If none exists, create one. */ ret = setup_buffer_reg_uid(usess, app, NULL); if (ret < 0) { + delete_ust_app_session(-1, ua_sess, app); goto error; } break; -- 2.34.1