decompress_iob(): Fix a memory leak
authorFabian Keil <fk@fabiankeil.de>
Thu, 28 Jan 2021 17:02:56 +0000 (18:02 +0100)
committerFabian Keil <fk@fabiankeil.de>
Sat, 30 Jan 2021 16:21:25 +0000 (17:21 +0100)
... when decompression fails "unexpectedly".

OVE-20210128-0001.

parsers.c

index 3b19530..df7b86b 100644 (file)
--- a/parsers.c
+++ b/parsers.c
@@ -818,6 +818,7 @@ jb_err decompress_iob(struct client_state *csp)
       log_error(LOG_LEVEL_ERROR,
          "Unexpected error while decompressing to the buffer (iob): %s",
          zstr.msg);
+      freez(buf);
       return JB_ERR_COMPRESS;
    }