From 8e4e6b056c5ecf731f84a71e4e319d2a27734ec2 Mon Sep 17 00:00:00 2001 From: Zhengyu Gu Date: Mon, 12 Jun 2023 14:03:17 +0000 Subject: [PATCH] 8309761: Leak class loader constraints Reviewed-by: coleenp, jsjolen --- src/hotspot/share/classfile/loaderConstraints.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/hotspot/share/classfile/loaderConstraints.cpp b/src/hotspot/share/classfile/loaderConstraints.cpp index a4b327edee4..e5d0998966f 100644 --- a/src/hotspot/share/classfile/loaderConstraints.cpp +++ b/src/hotspot/share/classfile/loaderConstraints.cpp @@ -89,6 +89,9 @@ class ConstraintSet { // copied into hashtable as } ~ConstraintSet() { + while (!_constraints->is_empty()) { + delete _constraints->pop(); + } delete _constraints; }