diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-10-09 16:29:44 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-10-09 16:29:44 +0000 |
commit | afd7a8d744b29daaedbba1969307bd9ce17e7dc3 (patch) | |
tree | 015fa25e84f72a32b31724add0969f51a03bb74d /shell/hush_test/hush-vars | |
parent | 07e05c100fe6ac2bc5aa3505daabb55224c06a1f (diff) | |
download | busybox-afd7a8d744b29daaedbba1969307bd9ce17e7dc3.tar.gz |
hush: fix environment and memory leaks, add tests for them
function old new delta
add_malloced_string_to_strings - 110 +110
run_list 1999 2086 +87
free_strings_and_unsetenv - 87 +87
hush_version_str - 18 +18
pseudo_exec_argv 139 146 +7
static.version_str 17 - -17
free_pipe 237 210 -27
done_word 790 642 -148
------------------------------------------------------------------------------
(add/remove: 3/1 grow/shrink: 2/2 up/down: 309/-192) Total: 117 bytes
Diffstat (limited to 'shell/hush_test/hush-vars')
-rw-r--r-- | shell/hush_test/hush-vars/var_leaks.right | 1 | ||||
-rwxr-xr-x | shell/hush_test/hush-vars/var_leaks.tests | 14 |
2 files changed, 15 insertions, 0 deletions
diff --git a/shell/hush_test/hush-vars/var_leaks.right b/shell/hush_test/hush-vars/var_leaks.right new file mode 100644 index 000000000..d86bac9de --- /dev/null +++ b/shell/hush_test/hush-vars/var_leaks.right @@ -0,0 +1 @@ +OK diff --git a/shell/hush_test/hush-vars/var_leaks.tests b/shell/hush_test/hush-vars/var_leaks.tests new file mode 100755 index 000000000..27c8c6504 --- /dev/null +++ b/shell/hush_test/hush-vars/var_leaks.tests @@ -0,0 +1,14 @@ +# external program +a=b /bin/true +env | grep ^a= + +# builtin +a=b true +env | grep ^a= + +# exec with redirection only +# in bash, this leaks! +a=b exec 1>&1 +env | grep ^a= + +echo OK |