diff --git a/src/hotspot/share/utilities/elfFile.cpp b/src/hotspot/share/utilities/elfFile.cpp
index 44474ce5bb31b..7b567580ac333 100644
--- a/src/hotspot/share/utilities/elfFile.cpp
+++ b/src/hotspot/share/utilities/elfFile.cpp
@@ -258,7 +258,6 @@ NullDecoder::decoder_status ElfFile::load_tables() {
 int ElfFile::section_by_name(const char* name, Elf_Shdr& hdr) {
   assert(name != NULL, "No section name");
   size_t len = strlen(name) + 1;
-  ResourceMark rm;
   char* buf = (char*)os::malloc(len, mtInternal);
   if (buf == NULL) {
     return -1;