Fix a warning and potential segfault in lash when BB_FEATURE_CLEAN_UP

is enabled
This commit is contained in:
Eric Andersen committed 2001-08-22 05:32:24 +00:00
1 parent ac5dbd193b
commit 5d60a46269
2 files changed
+4 -4

No files matched your search

+2 -2
View 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);
+2 -2
View 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);