mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-27 03:13:37 +08:00
Fix crash bug caused by trying to free halloc:ed memory
darcs-hash:20060208153904-ac50b-f8b3d2aadb12fa1e6aca0c4ca7a6046a09a0450d.gz
This commit is contained in:
parent
a0e1f9113e
commit
7c3700c190
11
parser.c
11
parser.c
|
@ -2052,14 +2052,9 @@ static int parse_job( process_t *p,
|
|||
|
||||
if( error_code )
|
||||
{
|
||||
/*
|
||||
We don't know what the state of the args array and the argv
|
||||
vector is on error, so we do an internal cleanup here.
|
||||
*/
|
||||
al_foreach( &args,
|
||||
(void (*)(const void *))&free );
|
||||
free(p->argv);
|
||||
p->argv=0;
|
||||
if( !p->argv )
|
||||
al_foreach( &args,
|
||||
(void (*)(const void *))&free );
|
||||
/*
|
||||
Make sure the block stack is consistent
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue
Block a user