}
#ifdef HAVE_CURL
- CURL *curl;
CURLcode res;
FILE * file = fopen (tmp_file_location, "w");
{
int err = 0;
pkg_t *pkg;
+
pkg = pkg_new();
- if (pkg == NULL)
- return ENOMEM;
if (str_starts_with(url, "http://")
|| str_starts_with(url, "ftp://")) {
pkg = hash_insert_pkg(&conf->pkg_hash, pkg, 1,conf);
if (namep) {
- *namep = xstrdup(pkg->name);
+ *namep = pkg->name;
}
return 0;
}