--- a/hotspot/src/os/aix/vm/perfMemory_aix.cpp Mon Nov 03 11:34:13 2014 -0800
+++ b/hotspot/src/os/aix/vm/perfMemory_aix.cpp Wed Oct 29 10:13:24 2014 +0100
@@ -506,6 +506,7 @@
if (!is_directory_secure(dirname)) {
// the directory is not a secure directory
+ os::closedir(dirp);
return;
}
@@ -853,6 +854,9 @@
//
if (!is_directory_secure(dirname)) {
FREE_C_HEAP_ARRAY(char, dirname, mtInternal);
+ if (luser != user) {
+ FREE_C_HEAP_ARRAY(char, luser, mtInternal);
+ }
THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(),
"Process not found");
}