Mercurial > hg > icedtea7-forest > jdk
changeset 7884:2590a9c18fdb jdk7u80-b02
8054841: (process) ProcessBuilder leaks native memory
Reviewed-by: rriggs, alanb
author | igerasim |
---|---|
date | Tue, 12 Aug 2014 00:13:57 +0400 |
parents | 1922cb4a63e9 |
children | 7497dc085814 828c4fedd29f 0679be303315 |
files | src/solaris/native/java/lang/UNIXProcess_md.c |
diffstat | 1 files changed, 8 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/solaris/native/java/lang/UNIXProcess_md.c Thu Aug 07 22:16:57 2014 -0700 +++ b/src/solaris/native/java/lang/UNIXProcess_md.c Tue Aug 12 00:13:57 2014 +0400 @@ -602,9 +602,9 @@ */ assert(prog != NULL && argBlock != NULL); if ((phelperpath = getBytes(env, helperpath)) == NULL) goto Catch; - if ((pprog = getBytes(env, prog)) == NULL) goto Catch; - if ((pargBlock = getBytes(env, argBlock)) == NULL) goto Catch; - if ((c->argv = NEW(const char *, argc + 3)) == NULL) goto Catch; + if ((pprog = getBytes(env, prog)) == NULL) goto Catch; + if ((pargBlock = getBytes(env, argBlock)) == NULL) goto Catch; + if ((c->argv = NEW(const char *, argc + 3)) == NULL) goto Catch; c->argv[0] = pprog; c->argc = argc + 2; initVectorFromBlock(c->argv+1, pargBlock, argc); @@ -693,10 +693,11 @@ closeSafely(childenv[0]); closeSafely(childenv[1]); - releaseBytes(env, prog, pprog); - releaseBytes(env, argBlock, pargBlock); - releaseBytes(env, envBlock, penvBlock); - releaseBytes(env, dir, c->pdir); + releaseBytes(env, helperpath, phelperpath); + releaseBytes(env, prog, pprog); + releaseBytes(env, argBlock, pargBlock); + releaseBytes(env, envBlock, penvBlock); + releaseBytes(env, dir, c->pdir); free(c->argv); free(c->envv);