Fix: handle size 0 CTF fs streams
[babeltrace.git] / plugins / ctf / fs / fs.c
index 3a60b0d5e40d4dd632658c73fed9b30f7290bcb1..71ae52b079cae414ef1c69ce20fcdefe8866a95a 100644 (file)
@@ -554,6 +554,12 @@ int open_trace_streams(struct ctf_fs_component *ctf_fs,
                        goto error;
                }
 
+               if (file->size == 0) {
+                       /* Skip empty stream. */
+                       ctf_fs_file_destroy(file);
+                       continue;
+               }
+
                /* Create a private stream; file ownership is passed to it. */
                stream = ctf_fs_stream_create(ctf_fs, file);
                if (!stream) {
This page took 0.025328 seconds and 4 git commands to generate.