X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=formats%2Fctf%2Fctf.c;fp=formats%2Fctf%2Fctf.c;h=5578e68d49b52c815465315edf536f716b78c645;hp=4c3e30294a15f8756ffec66bb48bfc43b8c5690a;hb=5dafc78d347a7316fc1d4b57ba78fc347216edfb;hpb=2748fb3b919e397e5a17ac7b33d3b2027c00ba1f diff --git a/formats/ctf/ctf.c b/formats/ctf/ctf.c index 4c3e3029..5578e68d 100644 --- a/formats/ctf/ctf.c +++ b/formats/ctf/ctf.c @@ -2491,8 +2491,10 @@ struct bt_trace_descriptor *ctf_open_trace(const char *path, int flags, return &td->parent; error: - trace_debug_info_destroy(td); - g_free(td); + if (td) { + trace_debug_info_destroy(td); + g_free(td); + } return NULL; }