OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gcc/
[pf3gnuchains/gcc-fork.git]
/
libiberty
/
pexecute.c
diff --git
a/libiberty/pexecute.c
b/libiberty/pexecute.c
index
f486252
..
97f1574
100644
(file)
--- a/
libiberty/pexecute.c
+++ b/
libiberty/pexecute.c
@@
-47,7
+47,7
@@
pexecute (const char *program, char * const *argv, const char *pname,
{
if (pex != NULL)
{
{
if (pex != NULL)
{
- *errmsg_fmt = "pexecute already in progress";
+ *errmsg_fmt =
(char *)
"pexecute already in progress";
*errmsg_arg = NULL;
return -1;
}
*errmsg_arg = NULL;
return -1;
}
@@
-58,7
+58,7
@@
pexecute (const char *program, char * const *argv, const char *pname,
{
if (pex == NULL)
{
{
if (pex == NULL)
{
- *errmsg_fmt = "pexecute not in progress";
+ *errmsg_fmt =
(char *)
"pexecute not in progress";
*errmsg_arg = NULL;
return -1;
}
*errmsg_arg = NULL;
return -1;
}
@@
-99,9
+99,12
@@
pwait (int pid, int *status, int flags ATTRIBUTE_UNUSED)
{
int *vector;
{
int *vector;
- vector =
xmalloc (idx * sizeof (int)
);
+ vector =
XNEWVEC (int, idx
);
if (!pex_get_status (pex, idx, vector))
if (!pex_get_status (pex, idx, vector))
- return -1;
+ {
+ free (vector);
+ return -1;
+ }
*status = vector[pid];
free (vector);
}
*status = vector[pid];
free (vector);
}