[lttng-dev] [PATCH lttng-tools 03/13] Fix: ust app leak on UST buffer creation error
Mathieu Desnoyers
mathieu.desnoyers at efficios.com
Wed Dec 17 20:45:14 EST 2014
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
---
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 9dbd49b..3abd127 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.1.1
More information about the lttng-dev
mailing list