From e82474afed92abfa5344be7b06fcd99535bb9dfb Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sun, 4 Sep 2011 11:14:19 +0000 Subject: Fix string leakage svn path=/trunk/netsurf/; revision=12708 --- content/mimesniff.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'content/mimesniff.c') diff --git a/content/mimesniff.c b/content/mimesniff.c index a911318f9..3b4d3a8e8 100644 --- a/content/mimesniff.c +++ b/content/mimesniff.c @@ -399,8 +399,10 @@ static nserror mimesniff__compute_image(lwc_string *official_type, const struct it_s *it; - if (data == NULL) + if (data == NULL) { + lwc_string_unref(official_type); return NSERROR_NEED_DATA; + } for (it = image_types; it->sig != NULL; it++) { if (it->len <= len && memcmp(data, it->sig, it->len) == 0) { -- cgit v1.2.3