/* Utilities to execute a program in a subprocess (possibly linked by pipes
with other subprocesses), and wait for it.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004-2019 Free Software Foundation, Inc.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
{
if (pex != NULL)
{
- *errmsg_fmt = "pexecute already in progress";
+ *errmsg_fmt = (char *) "pexecute already in progress";
*errmsg_arg = NULL;
return -1;
}
{
if (pex == NULL)
{
- *errmsg_fmt = "pexecute not in progress";
+ *errmsg_fmt = (char *) "pexecute not in progress";
*errmsg_arg = NULL;
return -1;
}
vector = XNEWVEC (int, idx);
if (!pex_get_status (pex, idx, vector))
- return -1;
+ {
+ free (vector);
+ return -1;
+ }
*status = vector[pid];
free (vector);
}