index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dave Reisner <dreisner@archlinux.org> | 2011-10-22 13:16:39 -0400 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-10-27 17:49:09 -0500 |
commit | 4c259d51f7e0d5fac0158f70b0ad3b0043930943 (patch) | |
tree | bc3251c92b574af13465b020d7206f731a4c7395 | |
parent | f4875fab9bbe3011446032bebcbe232448a3e8d7 (diff) |
-rw-r--r-- | lib/libalpm/dload.c | 5 |
diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c index 546329b3..efd469d5 100644 --- a/lib/libalpm/dload.c +++ b/lib/libalpm/dload.c @@ -345,9 +345,10 @@ static int curl_download_internal(struct dload_payload *payload, payload->tempfile_openmode = "wb"; if(!payload->remote_name) { - payload->remote_name = strdup(get_filename(payload->fileurl)); + STRDUP(payload->remote_name, get_filename(payload->fileurl), + RET_ERR(handle, ALPM_ERR_MEMORY, -1)); } - if(!payload->remote_name || curl_gethost(payload->fileurl, hostname, sizeof(hostname)) != 0) { + if(curl_gethost(payload->fileurl, hostname, sizeof(hostname)) != 0) { _alpm_log(handle, ALPM_LOG_ERROR, _("url '%s' is invalid\n"), payload->fileurl); RET_ERR(handle, ALPM_ERR_SERVER_BAD_URL, -1); } |