8249144: Potential memory leak in TypedMethodOptionMatcher

Reviewed-by: thartmann
This commit is contained in:
Zhengyu Gu 2020-11-23 13:44:43 +00:00
parent 895cc4f0a2
commit 84429cd944

View File

@ -247,6 +247,11 @@ TypedMethodOptionMatcher* TypedMethodOptionMatcher::clone() {
}
TypedMethodOptionMatcher::~TypedMethodOptionMatcher() {
if (type() == CcstrType) {
ccstr v = value<ccstr>();
os::free((void*)v);
}
if (_option != NULL) {
os::free((void*)_option);
}