From ffed141f7aeaf313abcff15e7305319204234cda Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 4 Aug 2005 23:40:34 +0000 Subject: from popt.h: The argument array is malloc'd as a single area, so only argv must be free'd. Oops. (#165033) --- src/process.c | 5 ++--- 1 file 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); } } -- cgit v1.2.1