Skip to content
This repository was archived by the owner on Aug 27, 2022. It is now read-only.

Commit 84429cd

Browse files
committed
8249144: Potential memory leak in TypedMethodOptionMatcher
Reviewed-by: thartmann
1 parent 895cc4f commit 84429cd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/hotspot/share/compiler/compilerOracle.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,11 @@ TypedMethodOptionMatcher* TypedMethodOptionMatcher::clone() {
247247
}
248248

249249
TypedMethodOptionMatcher::~TypedMethodOptionMatcher() {
250+
if (type() == CcstrType) {
251+
ccstr v = value<ccstr>();
252+
os::free((void*)v);
253+
}
254+
250255
if (_option != NULL) {
251256
os::free((void*)_option);
252257
}

0 commit comments

Comments
 (0)