summaryrefslogtreecommitdiffhomepage
path: root/miscutils
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-06-24 05:00:50 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-06-24 05:00:50 +0200
commitdd8adde3866ac22bd510348b733bb29e1662ac6d (patch)
tree2408903bb476f50821ed5edbe5b13abafe4a5439 /miscutils
parentda75f4484469ca0122b80de69bf3b75a6be71efc (diff)
*: 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 'miscutils')
-rw-r--r--miscutils/crond.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/miscutils/crond.c b/miscutils/crond.c
index f51159233..4a3103cb9 100644
--- a/miscutils/crond.c
+++ b/miscutils/crond.c
@@ -264,8 +264,7 @@ static void safe_setenv(char **pvar_val, const char *var, const char *val)
char *var_val = *pvar_val;
if (var_val) {
- bb_unsetenv(var_val);
- free(var_val);
+ bb_unsetenv_and_free(var_val);
}
*pvar_val = xasprintf("%s=%s", var, val);
putenv(*pvar_val);