--- old/src/hotspot/share/classfile/classLoader.cpp 2018-04-10 14:35:19.768150141 -0400 +++ new/src/hotspot/share/classfile/classLoader.cpp 2018-04-10 14:35:19.152396290 -0400 @@ -758,7 +758,6 @@ struct stat st; if (os::stat(path, &st) == 0) { // File or directory found - Thread* THREAD = Thread::current(); ClassPathEntry* new_entry = create_class_path_entry(path, &st, false, false, CHECK); // If the path specification is valid, enter it into this module's list if (new_entry != NULL) { @@ -828,7 +827,6 @@ struct stat st; if (os::stat(path, &st) == 0) { // Directory found - Thread* THREAD = Thread::current(); ClassPathEntry* new_entry = create_class_path_entry(path, &st, false, false, CHECK); // Check for a jimage @@ -873,7 +871,7 @@ const char file_sep = os::file_separator()[0]; // 10 represents the length of "modules" + 2 file separators + \0 size_t len = strlen(home) + strlen(module_name) + 10; - char *path = NEW_C_HEAP_ARRAY(char, len, mtModule); + char *path = NEW_RESOURCE_ARRAY(char, len); jio_snprintf(path, len, "%s%cmodules%c%s", home, file_sep, file_sep, module_name); struct stat st; @@ -895,7 +893,6 @@ log_info(class, load)("path: %s", path); } } - FREE_C_HEAP_ARRAY(char, path); } ClassPathEntry* ClassLoader::create_class_path_entry(const char *path, const struct stat* st,