summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
Diffstat (limited to 'content')
-rw-r--r--content/mimesniff.c4
1 files changed, 3 insertions, 1 deletions
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) {