From 182b97ed3354fcdd4dfb3de54bf7afdf32c6365d Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Wed, 23 Oct 2013 18:55:51 +0100 Subject: Fix leak of html encoding. --- render/html.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'render/html.c') diff --git a/render/html.c b/render/html.c index 8fb35f8ff..1e7350cf1 100644 --- a/render/html.c +++ b/render/html.c @@ -863,6 +863,7 @@ html_process_encoding_change(struct content *c, if (html->encoding != NULL) { free(html->encoding); + html->encoding = NULL; } html->encoding = strdup(encoding); @@ -1367,6 +1368,12 @@ static void html_destroy(struct content *c) html->title = NULL; } + /* Free encoding */ + if (html->encoding != NULL) { + free(html->encoding); + html->encoding = NULL; + } + /* Free base target */ if (html->base_target != NULL) { free(html->base_target); -- cgit v1.2.3