From 73e81addba12182e060c713c7f88634583ebb59f Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sun, 5 Oct 2014 07:34:15 +0200 Subject: [PATCH] bin/xbps-rindex/remove-obsoletes.c: resource leak (CID 62707) --- bin/xbps-rindex/remove-obsoletes.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/xbps-rindex/remove-obsoletes.c b/bin/xbps-rindex/remove-obsoletes.c index d8d59d8b..b9414a18 100644 --- a/bin/xbps-rindex/remove-obsoletes.c +++ b/bin/xbps-rindex/remove-obsoletes.c @@ -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);