- goto error_destroy;
- }
-
- /*
- * A stream class may not have a stream event context defined
- * in which case this stream will never have a stream_event_context
- * member since, after a stream's creation, the parent stream class
- * is "frozen" (immutable).
- */
- if (stream_class->event_context_type) {
- stream->event_context = bt_ctf_field_create(
- stream_class->event_context_type);
- if (!stream->packet_context) {
- goto error_destroy;
- }