bin/xbps-rindex/remove-obsoletes.c: resource leak (CID 62707)

This commit is contained in:
Juan RP 2014-10-05 07:34:15 +02:00
parent aa8d88272e
commit 73e81addba

View File

@ -69,7 +69,7 @@ cleaner_cb(struct xbps_handle *xhp, xbps_object_t obj, const char *key _unused,
{
struct xbps_repo *repo = arg;
const char *binpkg;
char *pkgver, *arch;
char *pkgver, *arch = NULL;
int rv;
binpkg = xbps_string_cstring_nocopy(obj);
@ -88,6 +88,7 @@ cleaner_cb(struct xbps_handle *xhp, xbps_object_t obj, const char *key _unused,
free(arch);
return 0;
}
free(arch);
pkgver = xbps_binpkg_pkgver(binpkg);
assert(pkgver);