]> sbz's 6dev Repos - ctfdump/.git/blobdiff - ctfdump.c
Merge pull request #2 from jasperla/inflail
[ctfdump/.git] / ctfdump.c
index e3e54d36ae510729a3e7f55bedb04fd1fcbb92e1..1c7f345641caa5b46336e4f96d7dc2deb7eafdcd 100644 (file)
--- a/ctfdump.c
+++ b/ctfdump.c
@@ -568,6 +568,7 @@ decompress(const char *buf, size_t size, off_t len)
 
        if ((error = inflate(&stream, Z_FINISH)) != Z_STREAM_END) {
                warnx("zlib inflate failed: %s", zError(error));
 
        if ((error = inflate(&stream, Z_FINISH)) != Z_STREAM_END) {
                warnx("zlib inflate failed: %s", zError(error));
+               inflateEnd(&stream);
                goto exit;
        }
 
                goto exit;
        }