X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=formats%2Fctf%2Fir%2Fstream.c;h=70e2ec2a0ab0218d4190955e09a3ceb67dbb3709;hb=9235146064cacb819bbb4edbebed1e41952eb77c;hp=a903264963572ecc89279cb4b8f14781687ce909;hpb=582038278055246e2cc7a6f70442490b274e4200;p=babeltrace.git diff --git a/formats/ctf/ir/stream.c b/formats/ctf/ir/stream.c index a9032649..70e2ec2a 100644 --- a/formats/ctf/ir/stream.c +++ b/formats/ctf/ir/stream.c @@ -312,6 +312,9 @@ struct bt_ctf_stream *bt_ctf_stream_create( /* A trace is not allowed to have a NULL packet header */ assert(trace->packet_header_type); stream->packet_header = bt_ctf_field_create(trace->packet_header_type); + if (!stream->packet_header) { + goto error_destroy; + } /* * Attempt to populate the default trace packet header fields * (magic, uuid and stream_id). This will _not_ fail shall the