Fix: segfault on error handling
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 11 Apr 2012 21:05:58 +0000 (17:05 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 11 Apr 2012 21:05:58 +0000 (17:05 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
formats/ctf/ctf.c

index 1e4e491d2f55e9635db2c004f1e72662b172864c..ad218c0f3aeb5a5f50ca4c34bb5d1d0451a7f11f 100644 (file)
@@ -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);
This page took 0.0357 seconds and 4 git commands to generate.