1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

Fix memory leak on unset of associative array (#64)

Associative arrays weren't being properly freed from memory, which
was causing a memory leak.

This commit incorporates a patch and reproducer/regress test from:
https://www.mail-archive.com/ast-users@lists.research.att.com/msg01016.html

src/cmd/ksh93/sh/name.c:
- Properly free associative arrays from memory in nv_delete().

src/cmd/ksh93/tests/leaks.sh:
- Add regression test.
This commit is contained in:
Johnothan King 2020-07-08 17:09:40 -07:00 committed by GitHub
parent bf79131f40
commit e70925ce10
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 34 additions and 0 deletions

2
NEWS
View file

@ -8,6 +8,8 @@ Any uppercase BUG_* names are modernish shell bug IDs.
- 'notty' is now written to the ksh auditing file instead of '(null)' if
the user's tty could not be determined.
- Unsetting an associative array no longer causes a memory leak to occur.
2020-07-05:
- In UTF-8 locales, fix corruption of the shell's internal string quoting