Signed-off-by: David Goulet <david.goulet@polymtl.ca>
ksession = session->kernel_session;
usess = session->ust_session;
- if (session->enabled)
- return LTTCOMM_UST_START_FAIL;
+ if (session->enabled) {
+ ret = LTTCOMM_UST_START_FAIL;
+ goto error;
+ }
+
session->enabled = 1;
/* Kernel tracing */
ksession = session->kernel_session;
usess = session->ust_session;
- if (!session->enabled)
- return LTTCOMM_UST_START_FAIL;
+ if (!session->enabled) {
+ ret = LTTCOMM_UST_START_FAIL;
+ goto error;
+ }
+
session->enabled = 0;
/* Kernel tracer */