diff --git a/src/hotspot/share/classfile/classLoader.cpp b/src/hotspot/share/classfile/classLoader.cpp index b93ac8a75e757..db5e32d2f549b 100644 --- a/src/hotspot/share/classfile/classLoader.cpp +++ b/src/hotspot/share/classfile/classLoader.cpp @@ -237,6 +237,10 @@ const char* ClassPathEntry::copy_path(const char* path) { return copy; } +ClassPathDirEntry::~ClassPathDirEntry() { + FREE_C_HEAP_ARRAY(char, _dir); +} + ClassFileStream* ClassPathDirEntry::open_stream(JavaThread* current, const char* name) { // construct full path name assert((_dir != NULL) && (name != NULL), "sanity"); diff --git a/src/hotspot/share/classfile/classLoader.hpp b/src/hotspot/share/classfile/classLoader.hpp index ffbf3289046ca..20e60b2e210f3 100644 --- a/src/hotspot/share/classfile/classLoader.hpp +++ b/src/hotspot/share/classfile/classLoader.hpp @@ -80,7 +80,7 @@ class ClassPathDirEntry: public ClassPathEntry { ClassPathDirEntry(const char* dir) { _dir = copy_path(dir); } - virtual ~ClassPathDirEntry() {} + virtual ~ClassPathDirEntry(); ClassFileStream* open_stream(JavaThread* current, const char* name); };