diff options
Diffstat (limited to 'libiberty/pexecute.c')
-rw-r--r-- | libiberty/pexecute.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libiberty/pexecute.c b/libiberty/pexecute.c index cce6e300c5d..fa65fe8f49e 100644 --- a/libiberty/pexecute.c +++ b/libiberty/pexecute.c @@ -101,7 +101,10 @@ pwait (int pid, int *status, int flags ATTRIBUTE_UNUSED) vector = XNEWVEC (int, idx); if (!pex_get_status (pex, idx, vector)) - return -1; + { + free (vector) + return -1; + } *status = vector[pid]; free (vector); } |