diff options
Diffstat (limited to 'tools/tiffsplit.c')
-rw-r--r-- | tools/tiffsplit.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/tiffsplit.c b/tools/tiffsplit.c index 296d6bf9..ffcd00f2 100644 --- a/tools/tiffsplit.c +++ b/tools/tiffsplit.c @@ -91,10 +91,16 @@ main(int argc, char* argv[]) out = TIFFOpen(path, TIFFIsBigEndian(in)?"wb":"wl"); _TIFFfree(path); - if (out == NULL) + if (out == NULL) { + TIFFClose(in); return (EXIT_FAILURE); - if (!tiffcp(in, out)) + } + if (!tiffcp(in, out)) { + TIFFClose(in); + TIFFClose(out); return (EXIT_FAILURE); + + } TIFFClose(out); } while (TIFFReadDirectory(in)); |