aboutsummaryrefslogtreecommitdiff
path: root/miscutils
diff options
context:
space:
mode:
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);