summaryrefslogtreecommitdiff
path: root/src/decode.c
diff options
context:
space:
mode:
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);