diff --git a/src/cmd/ksh93/tests/leaks.sh b/src/cmd/ksh93/tests/leaks.sh index 6db3ad630..641b9590b 100755 --- a/src/cmd/ksh93/tests/leaks.sh +++ b/src/cmd/ksh93/tests/leaks.sh @@ -246,5 +246,16 @@ done after=$(getmem) err_exit_if_leak 'typeset in function called by command substitution' +# ====== +# Check that unsetting an alias frees both the node and its value + +before=$(getmem) +for ((i=0; i < N; i++)) +do alias "test$i=command$i" + unalias "test$i" +done +after=$(getmem) +err_exit_if_leak 'unalias' + # ====== exit $((Errors<125?Errors:125))