projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: Missing rcu_read_lock in cmd_list_events()
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
context.c
diff --git
a/src/bin/lttng-sessiond/context.c
b/src/bin/lttng-sessiond/context.c
index 10352d026952ec3361acccf6aa07ac97bab4b34f..cd4b85f2a9d576ff828617075e1f305120d69659 100644
(file)
--- a/
src/bin/lttng-sessiond/context.c
+++ b/
src/bin/lttng-sessiond/context.c
@@
-16,6
+16,7
@@
*/
#define _GNU_SOURCE
*/
#define _GNU_SOURCE
+#define _LGPL_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@
-198,7
+199,8
@@
int context_kernel_add(struct ltt_kernel_session *ksession,
kctx->ctx.ctx = LTTNG_KERNEL_CONTEXT_PERF_CPU_COUNTER;
break;
default:
kctx->ctx.ctx = LTTNG_KERNEL_CONTEXT_PERF_CPU_COUNTER;
break;
default:
- return LTTNG_ERR_KERN_CONTEXT_FAIL;
+ ret = LTTNG_ERR_KERN_CONTEXT_FAIL;
+ goto error;
}
kctx->ctx.u.perf_counter.type = ctx->u.perf_counter.type;
}
kctx->ctx.u.perf_counter.type = ctx->u.perf_counter.type;
@@
-226,9
+228,12
@@
int context_kernel_add(struct ltt_kernel_session *ksession,
}
}
}
}
- ret
=
LTTNG_OK;
+ ret
urn
LTTNG_OK;
error:
error:
+ if (kctx) {
+ trace_kernel_destroy_context(kctx);
+ }
return ret;
}
return ret;
}
This page took
0.024271 seconds
and
4
git commands to generate.