Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
locale.c: Free
curlocales[j]
before overwriting
The way to `curlocales[]` was handled in `Perl_init_i18nl10n' was a bit fragile (in my opinion). If one wasn't careful then it could lead to - double free - a (small) memory leak With the current code there does not appear to be a way to trigger either of those but it was to fragile for my liking. By calling `Safefree` before overwriting the value the code becomes (imo) more logical and the risk of the double free/memory leak disappears. For much more details see GH #20002
- Loading branch information