diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-07-02 15:36:57 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-07-02 15:36:57 +0000 |
commit | 8f6978405ddf1c7e280b097b655b6acbb8aa46ab (patch) | |
tree | da7f63e01738b8a0d83b026384ebcae53412e944 | |
parent | 10175a43eec696e5de1a35c12a31367808016c0b (diff) | |
download | busybox-w32-8f6978405ddf1c7e280b097b655b6acbb8aa46ab.tar.gz busybox-w32-8f6978405ddf1c7e280b097b655b6acbb8aa46ab.tar.bz2 busybox-w32-8f6978405ddf1c7e280b097b655b6acbb8aa46ab.zip |
Patch from vodz to fix freeing a static in cmdedit.
-rw-r--r-- | cmdedit.c | 3 | ||||
-rw-r--r-- | shell/cmdedit.c | 3 |
2 files changed, 4 insertions, 2 deletions
@@ -442,7 +442,8 @@ static void parse_prompt(const char *prmt_ptr) | |||
442 | if (flg_not_length == ']') | 442 | if (flg_not_length == ']') |
443 | sub_len++; | 443 | sub_len++; |
444 | } | 444 | } |
445 | free(pwd_buf); | 445 | if(pwd_buf!=(char *)unknown) |
446 | free(pwd_buf); | ||
446 | cmdedit_prompt = prmt_mem_ptr; | 447 | cmdedit_prompt = prmt_mem_ptr; |
447 | cmdedit_prmt_len = prmt_len - sub_len; | 448 | cmdedit_prmt_len = prmt_len - sub_len; |
448 | put_prompt(); | 449 | 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) | |||
442 | if (flg_not_length == ']') | 442 | if (flg_not_length == ']') |
443 | sub_len++; | 443 | sub_len++; |
444 | } | 444 | } |
445 | free(pwd_buf); | 445 | if(pwd_buf!=(char *)unknown) |
446 | free(pwd_buf); | ||
446 | cmdedit_prompt = prmt_mem_ptr; | 447 | cmdedit_prompt = prmt_mem_ptr; |
447 | cmdedit_prmt_len = prmt_len - sub_len; | 448 | cmdedit_prmt_len = prmt_len - sub_len; |
448 | put_prompt(); | 449 | put_prompt(); |