summaryrefslogtreecommitdiff
path: root/content/fetchcache.c
diff options
context:
space:
mode:
Diffstat (limited to 'content/fetchcache.c')
-rw-r--r--content/fetchcache.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/content/fetchcache.c b/content/fetchcache.c
index a763db193..6b3f85905 100644
--- a/content/fetchcache.c
+++ b/content/fetchcache.c
@@ -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;