summaryrefslogtreecommitdiff
path: root/content/fetch.c
diff options
context:
space:
mode:
Diffstat (limited to 'content/fetch.c')
-rw-r--r--content/fetch.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/content/fetch.c b/content/fetch.c
index 81f5e3a26..cb1353f98 100644
--- a/content/fetch.c
+++ b/content/fetch.c
@@ -227,12 +227,16 @@ struct fetch * fetch_start(char *url, char *referer,
CURLcode code;
CURLMcode codem;
struct curl_slist *slist;
+ url_func_result res;
fetch = malloc(sizeof (*fetch));
if (!fetch)
return 0;
- host = url_host(url);
+ res = url_host(url, &host);
+ /* we only fail memory exhaustion */
+ if (res == URL_FUNC_NOMEM)
+ goto failed;
LOG(("fetch %p, url '%s'", fetch, url));