X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=formats%2Fctf%2Fctf.c;h=ad218c0f3aeb5a5f50ca4c34bb5d1d0451a7f11f;hp=1e4e491d2f55e9635db2c004f1e72662b172864c;hb=8210f9da616a44f4055e6a7b6745ca280f4e1cb4;hpb=64c2c2496913d64ddd77343b9651f1f233cda5cf diff --git a/formats/ctf/ctf.c b/formats/ctf/ctf.c index 1e4e491d..ad218c0f 100644 --- a/formats/ctf/ctf.c +++ b/formats/ctf/ctf.c @@ -983,7 +983,8 @@ end: ctf_scanner_free(scanner); end_scanner_alloc: end_packet_read: - fclose(fp); + if (fp) + fclose(fp); free(buf); end_stream: close(metadata_stream->pos.fd);