From b92ca9cd30ef1aefcd15898110fcd2d9c84daf63 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Mon, 16 May 2011 21:16:44 +0000 Subject: Clean up after content factory svn path=/trunk/netsurf/; revision=12415 --- content/content_factory.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'content/content_factory.c') diff --git a/content/content_factory.c b/content/content_factory.c index 95e7679ad..ae226a4d1 100644 --- a/content/content_factory.c +++ b/content/content_factory.c @@ -44,6 +44,24 @@ typedef struct content_handler_entry { static content_handler_entry *content_handlers; +/** + * Clean up after the content factory + */ +void content_factory_fini(void) +{ + content_handler_entry *victim; + + while (content_handlers != NULL) { + victim = content_handlers; + + content_handlers = content_handlers->next; + + lwc_string_unref(victim->mime_type); + + free(victim); + } +} + /** * Register a handler with the content factory * -- cgit v1.2.3