summaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
Diffstat (limited to 'networking')
-rw-r--r--networking/tcpudp.c3
-rw-r--r--networking/udhcp/dhcpc.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/networking/tcpudp.c b/networking/tcpudp.c
index 42845df..b32fad6 100644
--- a/networking/tcpudp.c
+++ b/networking/tcpudp.c
@@ -85,8 +85,7 @@ static void undo_xsetenv(void)
char **pp = env_cur = &env_var[0];
while (*pp) {
char *var = *pp;
- bb_unsetenv(var);
- free(var);
+ bb_unsetenv_and_free(var);
*pp++ = NULL;
}
}
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
index c2b21c6..de1b798 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -327,8 +327,7 @@ static void udhcp_run_script(struct dhcp_packet *packet, const char *name)
for (curr = envp; *curr; curr++) {
log2(" %s", *curr);
- bb_unsetenv(*curr);
- free(*curr);
+ bb_unsetenv_and_free(*curr);
}
free(envp);
}