xbps-rindex: clean: avoid printing obj key after removal (dangling pointer).

This commit is contained in:
Juan RP 2013-11-27 14:54:21 +01:00
parent 2f1e108af5
commit a8dc0dbdec

View File

@ -147,10 +147,10 @@ index_clean(struct xbps_handle *xhp, const char *repodir)
for (unsigned int x = 0; x < xbps_array_count(cbd.result); x++) { for (unsigned int x = 0; x < xbps_array_count(cbd.result); x++) {
xbps_array_get_cstring_nocopy(cbd.result, x, &keyname); xbps_array_get_cstring_nocopy(cbd.result, x, &keyname);
printf("index-files: removed entry %s\n", keyname); printf("index-files: removed entry %s\n", keyname);
printf("index: removed entry %s\n", keyname);
xbps_dictionary_remove(idxfiles, keyname); xbps_dictionary_remove(idxfiles, keyname);
pkgname = xbps_pkg_name(keyname); pkgname = xbps_pkg_name(keyname);
xbps_dictionary_remove(idx, pkgname); xbps_dictionary_remove(idx, pkgname);
printf("index: removed entry %s\n", keyname);
free(pkgname); free(pkgname);
flush = true; flush = true;
} }