X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fadd_context.c;fp=src%2Fbin%2Flttng%2Fcommands%2Fadd_context.c;h=df722bb249f39ef8ee28107c501a3b668998ca49;hp=5fc65bf556e7db963659e74dcbf0c90e27b44264;hb=1e19c0f692117a7e1d2f00b2c434d7bd68485575;hpb=67b2f51c7e8d8e873be92cb45a534855cecaf7de 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); }