summaryrefslogtreecommitdiff
path: root/src/decode.c
diff options
context:
space:
mode:
authorJorge Arellano Cid <jcid@dillo.org>2009-01-22 11:24:32 -0300
committerJorge Arellano Cid <jcid@dillo.org>2009-01-22 11:24:32 -0300
commitb60641ff73d7660929c8c6cc327d6c8dea9746b1 (patch)
tree0952515125d21e9375082ef45348a1100de0a3c1 /src/decode.c
parent3c08987366e61ed0835a48cdd677a012171fc1e4 (diff)
Fixed a memory leak in gzip decoder.
Diffstat (limited to 'src/decode.c')
-rw-r--r--src/decode.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/decode.c b/src/decode.c
index d22f939b..8b8d9081 100644
--- a/src/decode.c
+++ b/src/decode.c
@@ -126,6 +126,7 @@ static void Decode_gzip_free(Decode *dc)
{
(void)inflateEnd((z_stream *)dc->state);
+ dFree(dc->state);
dFree(dc->buffer);
}
@@ -182,6 +183,7 @@ static Dstr *Decode_charset(Decode *dc, const char *instr, int inlen)
static void Decode_charset_free(Decode *dc)
{
+ /* iconv_close() frees dc->state */
(void)iconv_close((iconv_t)(dc->state));
dFree(dc->buffer);