agent_ctx = create_app_ctx(ctx);
if (!agent_ctx) {
+ ret = LTTNG_ERR_NOMEM;
goto error_unlock;
}
/* 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;
}
}