bin/xbps-rindex/remove-obsoletes.c: fix use-after-free.
This commit is contained in:
parent
8fa5f15cbb
commit
2f9bd4f9a2
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user