Backport lash fix
authorEric Andersen <andersen@codepoet.org>
Wed, 22 Aug 2001 05:32:45 +0000 (05:32 -0000)
committerEric Andersen <andersen@codepoet.org>
Wed, 22 Aug 2001 05:32:45 +0000 (05:32 -0000)
busybox/lash.c
busybox/shell/lash.c

index 0af669116006455ccd0347773f4397f1f85d86a2..22e3c779eec2e95aef0a4ac2db52c09519c43e97 100644 (file)
@@ -1507,8 +1507,8 @@ static int busy_loop(FILE * input)
 #ifdef BB_FEATURE_CLEAN_UP
 void free_memory(void)
 {
-       if (cwd) {
-               free(cwd);
+       if (cwd && cwd!=unknown) {
+               free((char*)cwd);
        }
        if (local_pending_command)
                free(local_pending_command);
index 0af669116006455ccd0347773f4397f1f85d86a2..22e3c779eec2e95aef0a4ac2db52c09519c43e97 100644 (file)
@@ -1507,8 +1507,8 @@ static int busy_loop(FILE * input)
 #ifdef BB_FEATURE_CLEAN_UP
 void free_memory(void)
 {
-       if (cwd) {
-               free(cwd);
+       if (cwd && cwd!=unknown) {
+               free((char*)cwd);
        }
        if (local_pending_command)
                free(local_pending_command);