mirror of
https://github.com/topjohnwu/ndk-busybox.git
synced 2024-12-03 01:12:23 +00:00
Fix a warning and potential segfault in lash when BB_FEATURE_CLEAN_UP
is enabled
This commit is contained in:
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
Block a user