X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fadd_context.c;h=209a9f4eb1eba9a804b701d017f46a7598ad65fa;hb=0d5a66ffc18fe9abe115c66b664df71084ad1fc6;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..209a9f4eb 100644 --- a/src/bin/lttng/commands/add_context.c +++ b/src/bin/lttng/commands/add_context.c @@ -41,6 +41,12 @@ static int opt_jul; static int opt_log4j; static char *opt_type; +#ifdef LTTNG_EMBED_HELP +static const char help_msg[] = +#include +; +#endif + enum { OPT_HELP = 1, OPT_TYPE, @@ -662,7 +668,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); }