From b80f0b6c1d07192dc4f1fac59268e28bdf096b90 Mon Sep 17 00:00:00 2001 From: David Goulet Date: Tue, 30 Apr 2013 15:23:56 -0400 Subject: [PATCH] Fix: fd leak when creating UST metadata channel Signed-off-by: David Goulet --- src/bin/lttng-sessiond/ust-app.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/bin/lttng-sessiond/ust-app.c b/src/bin/lttng-sessiond/ust-app.c index c74599ded..d40593998 100644 --- a/src/bin/lttng-sessiond/ust-app.c +++ b/src/bin/lttng-sessiond/ust-app.c @@ -2572,7 +2572,6 @@ static int create_ust_app_metadata(struct ust_app_session *ua_sess, * Safe because the metadata obj pointer is not set so the delete below * will not put a FD back again. */ - lttng_fd_put(LTTNG_FD_APPS, 1); goto error_consumer; } @@ -2588,7 +2587,6 @@ static int create_ust_app_metadata(struct ust_app_session *ua_sess, * Safe because the metadata obj pointer is not set so the delete below * will not put a FD back again. */ - lttng_fd_put(LTTNG_FD_APPS, 1); goto error_consumer; } @@ -2596,6 +2594,7 @@ static int create_ust_app_metadata(struct ust_app_session *ua_sess, metadata->key, app->pid); error_consumer: + lttng_fd_put(LTTNG_FD_APPS, 1); delete_ust_app_channel(-1, metadata, app); error: return ret; -- 2.34.1