Fix: application context leak when enabling context
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Sun, 14 Feb 2016 23:00:43 +0000 (18:00 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sun, 14 Feb 2016 23:00:43 +0000 (18:00 -0500)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/agent.c

index a4b1510f5dfe387ba567430f0037840589017529..ced0f85cf018c93d5ad1ac9a79a7e6c788ab136c 100644 (file)
@@ -753,8 +753,8 @@ int agent_enable_context(struct lttng_event_context *ctx,
 
                /* Enable event on agent application through TCP socket. */
                ret = app_context_op(app, agent_ctx, AGENT_CMD_APP_CTX_ENABLE);
+               destroy_app_ctx(agent_ctx);
                if (ret != LTTNG_OK) {
-                       destroy_app_ctx(agent_ctx);
                        goto error_unlock;
                }
        }
This page took 0.025269 seconds and 4 git commands to generate.