diff options
author | jilles <jilles@FreeBSD.org> | 2009-08-23 21:09:46 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2009-08-23 21:09:46 +0000 |
commit | 4a8e08a1103988b9e44d3ae9584cd654796998b1 (patch) | |
tree | 907e1a91ca6ca57f1742a6081e71d2fcd1f405a4 /bin/sh/exec.h | |
parent | f0ee7a159b9f49405e827b40fed36a844334c3ac (diff) | |
download | FreeBSD-src-4a8e08a1103988b9e44d3ae9584cd654796998b1.zip FreeBSD-src-4a8e08a1103988b9e44d3ae9584cd654796998b1.tar.gz |
sh: Fix crash when undefining or redefining a currently executing function.
Add a reference count to function definitions.
Memory may leak if multiple SIGINTs arrive in interactive mode,
this will be fixed later by changing SIGINT handling.
PR: bin/137640
Diffstat (limited to 'bin/sh/exec.h')
-rw-r--r-- | bin/sh/exec.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/sh/exec.h b/bin/sh/exec.h index 9f81a6a..e3b9acd 100644 --- a/bin/sh/exec.h +++ b/bin/sh/exec.h @@ -46,11 +46,12 @@ enum { TYPECMD_TYPE /* type */ }; +union node; struct cmdentry { int cmdtype; union param { int index; - union node *func; + struct funcdef *func; } u; int special; }; |