Fix: lttng: add-trigger: null dereference on MI initialization error
[lttng-tools.git] / src / bin / lttng / commands / add_trigger.c
index e4111eba095a494987f60740a1e191b921fd3973..00f8f47e363401400db7d613939b8be17923245e 100644 (file)
@@ -2428,7 +2428,7 @@ error:
 
 end:
        /* Mi closing. */
-       if (lttng_opt_mi) {
+       if (lttng_opt_mi && mi_writer) {
                int mi_ret;
 
                /* Close output element. */
This page took 0.022785 seconds and 4 git commands to generate.