Fix: lttng-add-context: leak of application context parameters
[lttng-tools.git] / src / bin / lttng / commands / add_context.c
index c2614f2a2d023b8d20b4b98f64f8533844834653..16389e11398573d71f7c4e81eb61dde06688d4d9 100644 (file)
@@ -871,6 +871,10 @@ void destroy_ctx_type(struct ctx_type *type)
        }
        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);
+               }
        }
        free(type->opt);
        free(type);
This page took 0.02288 seconds and 4 git commands to generate.