aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2005-08-04 23:40:34 +0000
committerBill Nottingham <notting@redhat.com>2005-08-04 23:40:34 +0000
commitffed141f7aeaf313abcff15e7305319204234cda (patch)
treed60f0a6c715909ab0a5982fc8c69228fa02933e0 /src/process.c
parent61c613e1338cbc3965efee5854836ac262b7560c (diff)
downloadinitscripts-ffed141f7aeaf313abcff15e7305319204234cda.tar
initscripts-ffed141f7aeaf313abcff15e7305319204234cda.tar.gz
initscripts-ffed141f7aeaf313abcff15e7305319204234cda.tar.bz2
initscripts-ffed141f7aeaf313abcff15e7305319204234cda.tar.xz
initscripts-ffed141f7aeaf313abcff15e7305319204234cda.zip
from popt.h: The argument array is malloc'd as a single area, so only argv must be free'd. Oops. (#165033)
Diffstat (limited to 'src/process.c')
-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);
}
}