Fix string leakage

svn path=/trunk/netsurf/; revision=12708
This commit is contained in:
John Mark Bell 2011-09-04 11:14:19 +00:00
parent 6807fa854d
commit e82474afed
1 changed files with 3 additions and 1 deletions

View File

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