diff options
-rw-r--r-- | render/html.c | 7 |
1 files changed, 7 insertions, 0 deletions
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); |