mirror of
https://github.com/opnsense/src.git
synced 2026-03-16 23:55:19 -04:00
sh: Fix crash when undefining or redefining a currently executing function Add a reference count to function definitions. Memory may leak if a SIGINT arrives in interactive mode at exactly the wrong time, this will be fixed later by changing SIGINT handling. PR: bin/137640 Approved by: re (kib)
4 lines
118 B
Text
4 lines
118 B
Text
# $FreeBSD$
|
|
|
|
MALLOC_OPTIONS=J sh -c 'g() { g() { :; }; :; }; g' &&
|
|
MALLOC_OPTIONS=J sh -c 'g() { unset -f g; :; }; g'
|