aboutsummaryrefslogtreecommitdiff
path: root/src
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
parent3c08987366e61ed0835a48cdd677a012171fc1e4 (diff)
Fixed a memory leak in gzip decoder.
Diffstat (limited to 'src')
-rw-r--r--src/cache.c2
-rw-r--r--src/decode.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/cache.c b/src/cache.c
index 5a804b21..bb2b1ead 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -493,7 +493,7 @@ const char *a_Cache_set_content_type(const DilloUrl *url, const char *ctype)
dReturn_val_if_fail (entry != NULL, NULL);
- MSG("a_Cache_set_content_type {%s} {%s}\n", ctype, URL_STR(url));
+ _MSG("a_Cache_set_content_type {%s} {%s}\n", ctype, URL_STR(url));
curr = Cache_current_content_type(entry);
if (entry->TypeMeta) {
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);