mirror of https://github.com/mirror/busybox.git
Fix a warning and potential segfault in lash when BB_FEATURE_CLEAN_UP
is enabled1_00_stable_10817
parent
ac5dbd193b
commit
5d60a46269
4
lash.c
4
lash.c
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue