aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2005-08-04 23:39:57 +0000
committerBill Nottingham <notting@redhat.com>2005-08-04 23:39:57 +0000
commit6afbb5b21e514b2bd85486ebe8c0f8b26885ca4c (patch)
tree62cf31e889aefd2f18435e52e5b550e1d0d63e10
parent15e24943945d8825dd6bb6cf618238307d2c5220 (diff)
downloadinitscripts-6afbb5b21e514b2bd85486ebe8c0f8b26885ca4c.tar
initscripts-6afbb5b21e514b2bd85486ebe8c0f8b26885ca4c.tar.gz
initscripts-6afbb5b21e514b2bd85486ebe8c0f8b26885ca4c.tar.bz2
initscripts-6afbb5b21e514b2bd85486ebe8c0f8b26885ca4c.tar.xz
initscripts-6afbb5b21e514b2bd85486ebe8c0f8b26885ca4c.zip
from popt.h: The argument array is malloc'd as a single area, so only argv must be free'd. Oops. (#165033)
-rw-r--r--src/process.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/process.c b/src/process.c
index 39b50613..475d188b 100644
--- a/src/process.c
+++ b/src/process.c
@@ -252,9 +252,8 @@ int monitor(char *cmdname, int pid, int numfds, int *fds, int reexec, int quiet,
}
cmdargs[cmdargc+1]=NULL;
processArgs(cmdargc+1,cmdargs,1);
- for (z=0;z<(cmdargc);z++) {
- free(cmdargs[z]);
- }
+ free(cmdargs[0]);
+ free(tmpargs);
free(cmdargs);
}
}