X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=formats%2Fctf-text%2Fctf-text.c;h=cc22336ca5d33af0fe07c6c7b577b5e999a9a021;hp=afdc07c1d80576c367743e0e49a25e98c5fe17aa;hb=eb75a494900f763d9daca6a9bab5a8f01ffe552f;hpb=458af89d3baff393a4c38f70520fb51b811ad932 diff --git a/formats/ctf-text/ctf-text.c b/formats/ctf-text/ctf-text.c index afdc07c1..cc22336c 100644 --- a/formats/ctf-text/ctf-text.c +++ b/formats/ctf-text/ctf-text.c @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include #include @@ -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;