diff --git a/lib/repo_pkgdeps.c b/lib/repo_pkgdeps.c index c72adc7c..4c3c41fb 100644 --- a/lib/repo_pkgdeps.c +++ b/lib/repo_pkgdeps.c @@ -67,10 +67,9 @@ store_dependency(struct xbps_handle *xhp, xbps_array_add_cstring(replaces, self_replaced); free(self_replaced); - if (!xbps_dictionary_set(repo_pkgd, "replaces", replaces)) { - free(pkgname); + if (!xbps_dictionary_set(repo_pkgd, "replaces", replaces)) return EINVAL; - } + /* * Add the dictionary into the unsorted queue. */