summaryrefslogtreecommitdiff
path: root/shell/cmdedit.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/cmdedit.c')
-rw-r--r--shell/cmdedit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/shell/cmdedit.c b/shell/cmdedit.c
index 981253d..4f124d6 100644
--- a/shell/cmdedit.c
+++ b/shell/cmdedit.c
@@ -442,7 +442,8 @@ static void parse_prompt(const char *prmt_ptr)
if (flg_not_length == ']')
sub_len++;
}
- free(pwd_buf);
+ if(pwd_buf!=(char *)unknown)
+ free(pwd_buf);
cmdedit_prompt = prmt_mem_ptr;
cmdedit_prmt_len = prmt_len - sub_len;
put_prompt();