X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fadd_context.c;h=df722bb249f39ef8ee28107c501a3b668998ca49;hb=cf0bcb51ea857687a353d2851e572dba6cc63cb0;hp=5fc65bf556e7db963659e74dcbf0c90e27b44264;hpb=4fe444dafd2243de56091ab5dd7efa0050b0597f;p=lttng-tools.git diff --git a/src/bin/lttng/commands/add_context.c b/src/bin/lttng/commands/add_context.c index 5fc65bf55..df722bb24 100644 --- a/src/bin/lttng/commands/add_context.c +++ b/src/bin/lttng/commands/add_context.c @@ -662,7 +662,9 @@ void destroy_ctx_type(struct ctx_type *type) if (!type) { return; } - free(type->opt->symbol); + if (type->opt) { + free(type->opt->symbol); + } free(type->opt); free(type); }