projects
/
deliverable
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: memory leak in apply_context_reloc
[deliverable/lttng-ust.git]
/
liblttng-ust
/
lttng-bytecode.c
diff --git
a/liblttng-ust/lttng-bytecode.c
b/liblttng-ust/lttng-bytecode.c
index 30d3cbd105d2eb029f83482ab1f013ade312c496..a30dd1825cec23e021ec1590d198d5d889feb990 100644
(file)
--- a/
liblttng-ust/lttng-bytecode.c
+++ b/
liblttng-ust/lttng-bytecode.c
@@
-298,21
+298,21
@@
int apply_context_reloc(struct bytecode_runtime *runtime,
struct load_op *op;
struct lttng_ctx_field *ctx_field;
int idx;
struct load_op *op;
struct lttng_ctx_field *ctx_field;
int idx;
- struct lttng_ctx *
ctx = *
runtime->p.pctx;
+ struct lttng_ctx *
*pctx =
runtime->p.pctx;
dbg_printf("Apply context reloc: %u %s\n", reloc_offset, context_name);
/* Get context index */
dbg_printf("Apply context reloc: %u %s\n", reloc_offset, context_name);
/* Get context index */
- idx = lttng_get_context_index(ctx, context_name);
+ idx = lttng_get_context_index(
*p
ctx, context_name);
if (idx < 0) {
if (lttng_context_is_app(context_name)) {
int ret;
ret = lttng_ust_add_app_context_to_ctx_rcu(context_name,
if (idx < 0) {
if (lttng_context_is_app(context_name)) {
int ret;
ret = lttng_ust_add_app_context_to_ctx_rcu(context_name,
-
&
ctx);
+
p
ctx);
if (ret)
return ret;
if (ret)
return ret;
- idx = lttng_get_context_index(ctx, context_name);
+ idx = lttng_get_context_index(
*p
ctx, context_name);
if (idx < 0)
return -ENOENT;
} else {
if (idx < 0)
return -ENOENT;
} else {
@@
-324,7
+324,7
@@
int apply_context_reloc(struct bytecode_runtime *runtime,
return -EINVAL;
/* Get context return type */
return -EINVAL;
/* Get context return type */
- ctx_field = &
ctx
->fields[idx];
+ ctx_field = &
(*pctx)
->fields[idx];
op = (struct load_op *) &runtime->code[reloc_offset];
switch (bytecode_op) {
op = (struct load_op *) &runtime->code[reloc_offset];
switch (bytecode_op) {
This page took
0.024533 seconds
and
5
git commands to generate.