bin/xbps-rindex/remove-obsoletes.c: fix use-after-free.

This commit is contained in:
Juan RP 2013-08-07 16:01:59 +02:00
parent 8fa5f15cbb
commit 2f9bd4f9a2

View File

@ -159,7 +159,7 @@ remove_obsoletes(struct xbps_handle *xhp, const char *repodir)
if (array == NULL)
array = xbps_array_create();
xbps_array_add_cstring_nocopy(array, dp->d_name);
xbps_array_add_cstring(array, dp->d_name);
}
(void)closedir(dirp);