From 5d63f6f4423862848c2529c1410e1b08a0dff512 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Wed, 27 Nov 2013 15:00:37 +0100 Subject: [PATCH] xbps-rindex: clean: avoid printing obj key after removal (dangling pointer) v2. --- bin/xbps-rindex/index-clean.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/xbps-rindex/index-clean.c b/bin/xbps-rindex/index-clean.c index 7d4395c7..5a318223 100644 --- a/bin/xbps-rindex/index-clean.c +++ b/bin/xbps-rindex/index-clean.c @@ -148,9 +148,9 @@ index_clean(struct xbps_handle *xhp, const char *repodir) xbps_array_get_cstring_nocopy(cbd.result, x, &keyname); printf("index-files: removed entry %s\n", keyname); printf("index: removed entry %s\n", keyname); - xbps_dictionary_remove(idxfiles, keyname); pkgname = xbps_pkg_name(keyname); xbps_dictionary_remove(idx, pkgname); + xbps_dictionary_remove(idxfiles, keyname); free(pkgname); flush = true; }