From: Eric Andersen Date: Mon, 2 Jul 2001 15:36:57 +0000 (-0000) Subject: Patch from vodz to fix freeing a static in cmdedit. X-Git-Tag: 0_52~34 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8f6978405ddf1c7e280b097b655b6acbb8aa46ab;p=oweals%2Fbusybox.git Patch from vodz to fix freeing a static in cmdedit. --- diff --git a/cmdedit.c b/cmdedit.c index 981253db1..4f124d647 100644 --- a/cmdedit.c +++ b/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(); diff --git a/shell/cmdedit.c b/shell/cmdedit.c index 981253db1..4f124d647 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();