X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=formats%2Fctf-text%2Fctf-text.c;fp=formats%2Fctf-text%2Fctf-text.c;h=26df6eed2bc49fae320f913412eb08536b2f6a56;hp=b57eb93dc931d1a0ef3ecb0ad9fb339380db756c;hb=40af9f9fb5d827c8c58e32efd6fca204da1194c8;hpb=5b489212cc608a2c13e8ddca4fd5d60d7a8cde38 diff --git a/formats/ctf-text/ctf-text.c b/formats/ctf-text/ctf-text.c index b57eb93d..26df6eed 100644 --- a/formats/ctf-text/ctf-text.c +++ b/formats/ctf-text/ctf-text.c @@ -547,6 +547,10 @@ struct bt_trace_descriptor *ctf_text_open_trace(const char *path, int flags, FILE *fp; pos = g_new0(struct ctf_text_stream_pos, 1); + if (!pos) { + goto error; + } + init_trace_descriptor(&pos->trace_descriptor); pos->last_real_timestamp = -1ULL; pos->last_cycles_timestamp = -1ULL;