Fix: fd leak when creating UST metadata channel
authorDavid Goulet <dgoulet@efficios.com>
Tue, 30 Apr 2013 19:23:56 +0000 (15:23 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Tue, 30 Apr 2013 19:23:56 +0000 (15:23 -0400)
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng-sessiond/ust-app.c

index c74599ded1c38f8b65ed307ab3368e223c11c29a..d405939985a028ab41643a38a89a68523683aa75 100644 (file)
@@ -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;
This page took 0.029304 seconds and 5 git commands to generate.