mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-14 06:39:22 +03:00
Avoid potential NULL deference
svn path=/trunk/netsurf/; revision=9688
This commit is contained in:
parent
81c1b0e0df
commit
eba224e09e
@ -619,9 +619,11 @@ char *fetchcache_parse_type(const char *s, char **params[])
|
||||
return type;
|
||||
|
||||
no_memory:
|
||||
for (i = 0; i != MAX_ATTRS * 2 + 2; i++)
|
||||
free((*params)[i]);
|
||||
free(*params);
|
||||
if (*params != NULL) {
|
||||
for (i = 0; i != MAX_ATTRS * 2 + 2; i++)
|
||||
free((*params)[i]);
|
||||
free(*params);
|
||||
}
|
||||
free(type);
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user