mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-16 09:04:41 +02:00
8296347: Memory leak from ClassPathDirEntry::_dir
Co-authored-by: Justin King <jcking@google.com> Reviewed-by: dholmes, ccheung
This commit is contained in:
parent
671f84bd86
commit
8146e1af82
2 changed files with 5 additions and 1 deletions
|
@ -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");
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue