Validate notification type before casting
[babeltrace.git] / plugins / ctf / fs / fs.c
index 0c6f3d8d2671ba351ab5304a4c9295d5e19744a5..bf834f3fe4dd1a804a9ddfadb045e671ea224b84 100644 (file)
@@ -84,7 +84,7 @@ enum bt_notification_iterator_status ctf_fs_iterator_next(
        ctf_fs = bt_component_get_private_data(component);
        assert(ctf_fs);
 
-       ret = ctf_fs_data_stream_get_next_notification(ctf_fs, &notification);
+       ret = ctf_fs_data_stream_get_next_notification(ctf_fs, &notification, 0);
        if (ret || !notification) {
                goto end;
        }
@@ -161,7 +161,9 @@ void ctf_fs_destroy_data(struct ctf_fs_component *component)
 
        ctf_fs_metadata_fini(&component->metadata);
        BT_PUT(component->current_notification);
-       g_ptr_array_free(component->streams, TRUE);
+       if (component->streams) {
+               g_ptr_array_free(component->streams, TRUE);
+       }
        g_free(component);
 }
 
This page took 0.025106 seconds and 4 git commands to generate.