Fix: Possible use-after-free in create_ctx_type()
[lttng-tools.git] / src / bin / lttng / commands / add_context.c
index d58ee908b1cec00f2cc053fa5031e23cacfc8531..a802df0c11fb669c4bc4218ebf1776f022e31b8e 100644 (file)
@@ -728,6 +728,7 @@ struct ctx_type *create_ctx_type(void)
        if (!type->opt) {
                PERROR("malloc ctx_type options");
                destroy_ctx_type(type);
        if (!type->opt) {
                PERROR("malloc ctx_type options");
                destroy_ctx_type(type);
+               type = NULL;
                goto end;
        }
 end:
                goto end;
        }
 end:
This page took 0.031431 seconds and 4 git commands to generate.