summaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
Diffstat (limited to 'libbb')
-rw-r--r--libbb/xfuncs_printf.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libbb/xfuncs_printf.c b/libbb/xfuncs_printf.c
index 03aeaaa..f021493 100644
--- a/libbb/xfuncs_printf.c
+++ b/libbb/xfuncs_printf.c
@@ -323,6 +323,11 @@ void FAST_FUNC bb_unsetenv(const char *var)
free(tp);
}
+void FAST_FUNC bb_unsetenv_and_free(char *var)
+{
+ bb_unsetenv(var);
+ free(var);
+}
// Die with an error message if we can't set gid. (Because resource limits may
// limit this user to a given number of processes, and if that fills up the