Fix leak of html encoding.

This commit is contained in:
Michael Drake 2013-10-23 18:55:51 +01:00
parent 2754918e25
commit 182b97ed33

View File

@ -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);