Avoid potential NULL deference

svn path=/trunk/netsurf/; revision=9688
This commit is contained in:
John Mark Bell 2009-11-22 13:52:16 +00:00
parent 81c1b0e0df
commit eba224e09e

View File

@ -619,9 +619,11 @@ char *fetchcache_parse_type(const char *s, char **params[])
return type; return type;
no_memory: no_memory:
for (i = 0; i != MAX_ATTRS * 2 + 2; i++) if (*params != NULL) {
free((*params)[i]); for (i = 0; i != MAX_ATTRS * 2 + 2; i++)
free(*params); free((*params)[i]);
free(*params);
}
free(type); free(type);
return 0; return 0;