Fix crash bug caused by trying to free halloc:ed memory

darcs-hash:20060208153904-ac50b-f8b3d2aadb12fa1e6aca0c4ca7a6046a09a0450d.gz
This commit is contained in:
axel 2006-02-09 01:39:04 +10:00
parent a0e1f9113e
commit 7c3700c190

View File

@ -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
*/