hush: fix environment and memory leaks, add tests for them
authorDenis Vlasenko <vda.linux@googlemail.com>
Thu, 9 Oct 2008 16:29:44 +0000 (16:29 -0000)
committerDenis Vlasenko <vda.linux@googlemail.com>
Thu, 9 Oct 2008 16:29:44 +0000 (16:29 -0000)
commitafd7a8d744b29daaedbba1969307bd9ce17e7dc3
tree015fa25e84f72a32b31724add0969f51a03bb74d
parent07e05c100fe6ac2bc5aa3505daabb55224c06a1f
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
shell/hush.c
shell/hush_test/hush-vars/var_leaks.right [new file with mode: 0644]
shell/hush_test/hush-vars/var_leaks.tests [new file with mode: 0755]
shell/hush_test/hush-z_slow/leak_var.tests
shell/hush_test/hush-z_slow/leak_var2.right [new file with mode: 0644]
shell/hush_test/hush-z_slow/leak_var2.tests [new file with mode: 0755]