X-Git-Url: https://git.efficios.com/?a=blobdiff_plain;f=formats%2Fctf%2Fctf.c;h=bc96212149c47260ca5af36b73fa4458c0ffe27e;hb=80715793a0776d0bdcb8f04de68961086f8cd006;hp=c5d654c975f60a7ad74d3574eec377468ad185ce;hpb=eb75a494900f763d9daca6a9bab5a8f01ffe552f;p=babeltrace.git diff --git a/formats/ctf/ctf.c b/formats/ctf/ctf.c index c5d654c9..bc962121 100644 --- a/formats/ctf/ctf.c +++ b/formats/ctf/ctf.c @@ -2431,8 +2431,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; }