lib/fetch/http.c: CID 62698 (NULL pointer dereference)

This commit is contained in:
Juan RP 2014-10-07 10:51:37 +02:00
parent dc63aed221
commit d434b44cfc

View File

@ -1473,6 +1473,8 @@ fetchListHTTP(struct url_list *ue, struct url *url, const char *pattern, const c
} }
cache = malloc(sizeof(*cache)); cache = malloc(sizeof(*cache));
if (cache == NULL)
return -1;
fetchInitURLList(&cache->ue); fetchInitURLList(&cache->ue);
cache->location = fetchCopyURL(url); cache->location = fetchCopyURL(url);
} }