X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fagent.c;h=ced0f85cf018c93d5ad1ac9a79a7e6c788ab136c;hp=a4b1510f5dfe387ba567430f0037840589017529;hb=c12618b52dfd3c5ba932065b32cb5928fe0c2012;hpb=e0f4d107bab7aff609fa3e72b104eb78165380f8 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; } }