goto error;
}
- stream = bt_ctf_stream_create(stream_class, trace);
- if (!stream) {
- goto error;
- }
-
for (i = 0; i < trace->stream_classes->len; i++) {
if (trace->stream_classes->pdata[i] == stream_class) {
stream_class_found = 1;
}
}
+ stream = bt_ctf_stream_create(stream_class, trace);
+ if (!stream) {
+ goto error;
+ }
+
bt_ctf_stream_get(stream);
g_ptr_array_add(trace->streams, stream);