8062370: Various minor code improvements

A lot of fixes useful to improve the code quality.

Reviewed-by: coleenp, dholmes
This commit is contained in:
Goetz Lindenmaier 2014-10-29 10:13:24 +01:00
parent f048251de8
commit 0aa09022fa
35 changed files with 141 additions and 64 deletions

View file

@ -506,6 +506,7 @@ static void cleanup_sharedmem_resources(const char* dirname) {
if (!is_directory_secure(dirname)) {
// the directory is not a secure directory
os::closedir(dirp);
return;
}
@ -872,6 +873,9 @@ static void mmap_attach_shared(const char* user, int vmid, PerfMemory::PerfMemor
//
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");
}