summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
f40b76a)
Coverity reports that:
** CID
1518091: Null pointer dereferences (FORWARD_NULL)
/src/bin/lttng/commands/add_context.cpp: 820 in destroy_ctx_type(<unnamed>::ctx_type *)(
Free application context options only if type->opt isn't null.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Icc27d04480c4821ed33127f5baf293510cdb314e
if (type->opt) {
free(type->opt->symbol);
if (type->opt) {
free(type->opt->symbol);
- if (type->opt->ctx_type == CONTEXT_APP_CONTEXT) {
- free(type->opt->u.app_ctx.ctx_name);
- free(type->opt->u.app_ctx.provider_name);
+ if (type->opt->ctx_type == CONTEXT_APP_CONTEXT) {
+ free(type->opt->u.app_ctx.ctx_name);
+ free(type->opt->u.app_ctx.provider_name);
+ }