Fix: ctf: fix possible use-after-free in ctf_fs_component_create
[babeltrace.git] / src / plugins / ctf / fs-src / fs.c
index 707ea551503273fa61d260a5684452350b74efd8..8036fe1598a10f5384f5a507718ce63af3c676e1 100644 (file)
@@ -405,9 +405,8 @@ struct ctf_fs_component *ctf_fs_component_create(bt_logging_level log_level,
        goto end;
 
 error:
-       if (ctf_fs) {
-               ctf_fs_destroy(ctf_fs);
-       }
+       ctf_fs_destroy(ctf_fs);
+       ctf_fs = NULL;
 
 end:
        return ctf_fs;
This page took 0.023708 seconds and 4 git commands to generate.