Skip to content

Commit a250716

Browse files
committed
8255694: memory leak in JDWP debug agent after calling JVMTI GetAllThreads
Reviewed-by: amenkov, sspitsyn
1 parent acb5f65 commit a250716

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/jdk.jdwp.agent/share/native/libjdwp/threadControl.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1998, 2007, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -836,6 +836,7 @@ threadControl_onHook(void)
836836
*/
837837
node->isStarted = JNI_TRUE;
838838
}
839+
jvmtiDeallocate(threads);
839840
}
840841

841842
} END_WITH_LOCAL_REFS(env)
@@ -1549,7 +1550,8 @@ threadControl_suspendAll(void)
15491550
suspendAllCount++;
15501551
}
15511552

1552-
err: ;
1553+
err:
1554+
jvmtiDeallocate(threads);
15531555

15541556
} END_WITH_LOCAL_REFS(env)
15551557

0 commit comments

Comments
 (0)