From: David Goulet Date: Mon, 29 Oct 2012 18:49:50 +0000 (-0400) Subject: Fix: Cleanup UST app session on ustctl create session error X-Git-Tag: v2.1.0-rc6~8 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=0f83395d5e0e927fdab025eae023e68e9021af26;ds=sidebyside Fix: Cleanup UST app session on ustctl create session error Signed-off-by: David Goulet --- diff --git a/src/bin/lttng-sessiond/ust-app.c b/src/bin/lttng-sessiond/ust-app.c index 6f73c6df3..96f8eb0b3 100644 --- a/src/bin/lttng-sessiond/ust-app.c +++ b/src/bin/lttng-sessiond/ust-app.c @@ -976,9 +976,10 @@ static struct ust_app_session *create_ust_app_session( ret = ustctl_create_session(app->sock); if (ret < 0) { ERR("Creating session for app pid %d", app->pid); + delete_ust_app_session(-1, ua_sess); /* This means that the tracer is gone... */ ua_sess = (void*) -1UL; - goto error; + goto end; } ua_sess->handle = ret; @@ -993,11 +994,6 @@ static struct ust_app_session *create_ust_app_session( end: health_code_update(&health_thread_cmd); return ua_sess; - -error: - delete_ust_app_session(-1, ua_sess); - health_code_update(&health_thread_cmd); - return NULL; } /*