diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-06-24 05:00:50 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-06-24 05:00:50 +0200 |
commit | dd8adde3866ac22bd510348b733bb29e1662ac6d (patch) | |
tree | 2408903bb476f50821ed5edbe5b13abafe4a5439 /libbb/xfuncs_printf.c | |
parent | da75f4484469ca0122b80de69bf3b75a6be71efc (diff) | |
download | busybox-w32-dd8adde3866ac22bd510348b733bb29e1662ac6d.tar.gz busybox-w32-dd8adde3866ac22bd510348b733bb29e1662ac6d.tar.bz2 busybox-w32-dd8adde3866ac22bd510348b733bb29e1662ac6d.zip |
*: introduce and use bb_unsetenv_and_free
function old new delta
bb_unsetenv_and_free - 17 +17
tcpudpsvd_main 1819 1810 -9
safe_setenv 58 47 -11
udhcp_run_script 630 616 -14
make_device 1683 1663 -20
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/4 up/down: 17/-54) Total: -37 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb/xfuncs_printf.c')
-rw-r--r-- | libbb/xfuncs_printf.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libbb/xfuncs_printf.c b/libbb/xfuncs_printf.c index 03aeaaa38..f021493b1 100644 --- a/libbb/xfuncs_printf.c +++ b/libbb/xfuncs_printf.c | |||
@@ -323,6 +323,11 @@ void FAST_FUNC bb_unsetenv(const char *var) | |||
323 | free(tp); | 323 | free(tp); |
324 | } | 324 | } |
325 | 325 | ||
326 | void FAST_FUNC bb_unsetenv_and_free(char *var) | ||
327 | { | ||
328 | bb_unsetenv(var); | ||
329 | free(var); | ||
330 | } | ||
326 | 331 | ||
327 | // Die with an error message if we can't set gid. (Because resource limits may | 332 | // Die with an error message if we can't set gid. (Because resource limits may |
328 | // limit this user to a given number of processes, and if that fills up the | 333 | // limit this user to a given number of processes, and if that fills up the |