diff --git a/src/jdk.jdwp.agent/share/native/libjdwp/threadControl.c b/src/jdk.jdwp.agent/share/native/libjdwp/threadControl.c index 78ca29796aa..9f1f3ce3a5d 100644 --- a/src/jdk.jdwp.agent/share/native/libjdwp/threadControl.c +++ b/src/jdk.jdwp.agent/share/native/libjdwp/threadControl.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -836,6 +836,7 @@ threadControl_onHook(void) */ node->isStarted = JNI_TRUE; } + jvmtiDeallocate(threads); } } END_WITH_LOCAL_REFS(env) @@ -1549,7 +1550,8 @@ threadControl_suspendAll(void) suspendAllCount++; } - err: ; + err: + jvmtiDeallocate(threads); } END_WITH_LOCAL_REFS(env)