projects
/
lttng-modules.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add context support with metadata description
[lttng-modules.git]
/
ltt-context.c
diff --git
a/ltt-context.c
b/ltt-context.c
index cc9633ac08d63bdd46be0de4d62bf8a89e0fd76b..ff1ba2e1a3c5d8c18c68d8d17698022711dd5296 100644
(file)
--- a/
ltt-context.c
+++ b/
ltt-context.c
@@
-47,8
+47,12
@@
void lttng_destroy_context(struct lttng_ctx *ctx)
{
int i;
{
int i;
- for (i = 0; i < ctx->nr_fields; i++)
- ctx->fields[i].destroy(&ctx->fields[i]);
+ if (!ctx)
+ return;
+ for (i = 0; i < ctx->nr_fields; i++) {
+ if (ctx->fields[i].destroy)
+ ctx->fields[i].destroy(&ctx->fields[i]);
+ }
kfree(ctx->fields);
kfree(ctx);
}
kfree(ctx->fields);
kfree(ctx);
}
This page took
0.024773 seconds
and
4
git commands to generate.