lib/repo_pkgdeps.c: fix a double free in error branch (CID 62754)

This commit is contained in:
Juan RP 2014-10-05 07:09:40 +02:00
parent f98343e183
commit 96a117c558

View File

@ -67,10 +67,9 @@ store_dependency(struct xbps_handle *xhp,
xbps_array_add_cstring(replaces, self_replaced); xbps_array_add_cstring(replaces, self_replaced);
free(self_replaced); free(self_replaced);
if (!xbps_dictionary_set(repo_pkgd, "replaces", replaces)) { if (!xbps_dictionary_set(repo_pkgd, "replaces", replaces))
free(pkgname);
return EINVAL; return EINVAL;
}
/* /*
* Add the dictionary into the unsorted queue. * Add the dictionary into the unsorted queue.
*/ */