From 986720d9d77794e20499935fe2d219d4231f7edb Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Tue, 11 Oct 2011 06:55:20 +0000 Subject: If the about handler fails to intern its strings, return the error, cleaning up first svn path=/trunk/netsurf/; revision=13031 --- content/fetchers/about.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'content/fetchers') diff --git a/content/fetchers/about.c b/content/fetchers/about.c index cb533bc54..ab5f1f6f0 100644 --- a/content/fetchers/about.c +++ b/content/fetchers/about.c @@ -586,6 +586,12 @@ static bool fetch_about_initialise(lwc_string *scheme) error = lwc_intern_string(about_handler_list[abt_loop].name, about_handler_list[abt_loop].name_len, &about_handler_list[abt_loop].lname); + if (error != lwc_error_ok) { + while (abt_loop-- != 0) { + lwc_string_unref(about_handler_list[abt_loop].lname); + } + return false; + } } return true; -- cgit v1.2.3