diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/env.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -23,9 +23,9 @@ long environ_bytes() void xclearenv(void) { if (toys.envc) { - char **ss; + int i; - for (ss = environ; *ss; ss++) free(*ss); + for (i = 0; environ[i]; i++) if (i>=toys.envc) free(environ[i]); free(environ); } toys.envc = 0; |