aboutsummaryrefslogtreecommitdiff
path: root/busybox/networking/ifupdown.c
diff options
context:
space:
mode:
Diffstat (limited to 'busybox/networking/ifupdown.c')
-rw-r--r--busybox/networking/ifupdown.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/busybox/networking/ifupdown.c b/busybox/networking/ifupdown.c
index 1842be58b..21afe42d4 100644
--- a/busybox/networking/ifupdown.c
+++ b/busybox/networking/ifupdown.c
@@ -150,7 +150,7 @@ struct interfaces_file_t
150 150
151static char no_act = 0; 151static char no_act = 0;
152static char verbose = 0; 152static char verbose = 0;
153static char **environ = NULL; 153static char **__myenviron = NULL;
154 154
155#ifdef CONFIG_FEATURE_IFUPDOWN_IP 155#ifdef CONFIG_FEATURE_IFUPDOWN_IP
156 156
@@ -961,16 +961,16 @@ static void set_environ(struct interface_defn_t *iface, char *mode)
961 const int n_env_entries = iface->n_options + 5; 961 const int n_env_entries = iface->n_options + 5;
962 char **ppch; 962 char **ppch;
963 963
964 if (environ != NULL) { 964 if (__myenviron != NULL) {
965 for (ppch = environ; *ppch; ppch++) { 965 for (ppch = __myenviron; *ppch; ppch++) {
966 free(*ppch); 966 free(*ppch);
967 *ppch = NULL; 967 *ppch = NULL;
968 } 968 }
969 free(environ); 969 free(__myenviron);
970 environ = NULL; 970 __myenviron = NULL;
971 } 971 }
972 environ = xmalloc(sizeof(char *) * (n_env_entries + 1 /* for final NULL */ )); 972 __myenviron = xmalloc(sizeof(char *) * (n_env_entries + 1 /* for final NULL */ ));
973 environend = environ; 973 environend = __myenviron;
974 *environend = NULL; 974 *environend = NULL;
975 975
976 for (i = 0; i < iface->n_options; i++) { 976 for (i = 0; i < iface->n_options; i++) {
@@ -1010,7 +1010,7 @@ static int doit(char *str)
1010 case -1: /* failure */ 1010 case -1: /* failure */
1011 return 0; 1011 return 0;
1012 case 0: /* child */ 1012 case 0: /* child */
1013 execle(DEFAULT_SHELL, DEFAULT_SHELL, "-c", str, NULL, environ); 1013 execle(DEFAULT_SHELL, DEFAULT_SHELL, "-c", str, NULL, __myenviron);
1014 exit(127); 1014 exit(127);
1015 } 1015 }
1016 waitpid(child, &status, 0); 1016 waitpid(child, &status, 0);