From 2f9bd4f9a233d0b4129db609765f7044a34c0d4c Mon Sep 17 00:00:00 2001 From: Juan RP Date: Wed, 7 Aug 2013 16:01:59 +0200 Subject: [PATCH] bin/xbps-rindex/remove-obsoletes.c: fix use-after-free. --- bin/xbps-rindex/remove-obsoletes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/xbps-rindex/remove-obsoletes.c b/bin/xbps-rindex/remove-obsoletes.c index 66050ad7..547e0118 100644 --- a/bin/xbps-rindex/remove-obsoletes.c +++ b/bin/xbps-rindex/remove-obsoletes.c @@ -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);