From c12618b52dfd3c5ba932065b32cb5928fe0c2012 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Sun, 14 Feb 2016 18:00:43 -0500 Subject: [PATCH] Fix: application context leak when enabling context MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau --- src/bin/lttng-sessiond/agent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/lttng-sessiond/agent.c b/src/bin/lttng-sessiond/agent.c index a4b1510f5..ced0f85cf 100644 --- a/src/bin/lttng-sessiond/agent.c +++ b/src/bin/lttng-sessiond/agent.c @@ -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; } } -- 2.34.1