diff --git a/bin/xbps-repo/index.c b/bin/xbps-repo/index.c index 58f7f1e9..4853173b 100644 --- a/bin/xbps-repo/index.c +++ b/bin/xbps-repo/index.c @@ -95,10 +95,9 @@ again: } free(binpkg); } - if (found) { - if (!prop_array_externalize_to_zfile(array, plist)) - rv = errno; - } + if (found && !prop_array_externalize_to_zfile(array, plist)) + rv = errno; + free(plist); return rv;