From: Jérémie Galarneau Date: Sun, 14 Feb 2016 23:00:43 +0000 (-0500) Subject: Fix: application context leak when enabling context X-Git-Tag: v2.8.0-rc1~162 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=c12618b52dfd3c5ba932065b32cb5928fe0c2012;ds=inline Fix: application context leak when enabling context Signed-off-by: Jérémie Galarneau --- 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; } }