mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-03 10:20:57 +00:00
8276990: Memory leak in invoker.c fillInvokeRequest() during JDI operations
Reviewed-by: sspitsyn, cjplummer
This commit is contained in:
parent
fe547eacd7
commit
5ab22e88da
@ -232,6 +232,7 @@ fillInvokeRequest(JNIEnv *env, InvokeRequest *request,
|
||||
/*
|
||||
* Squirrel away the method signature
|
||||
*/
|
||||
JDI_ASSERT_MSG(request->methodSignature == NULL, "Request methodSignature not null");
|
||||
error = methodSignature(method, NULL, &request->methodSignature, NULL);
|
||||
if (error != JVMTI_ERROR_NONE) {
|
||||
return error;
|
||||
@ -775,6 +776,10 @@ invoker_completeInvokeRequest(jthread thread)
|
||||
*/
|
||||
deleteGlobalArgumentRefs(env, request);
|
||||
|
||||
JDI_ASSERT_MSG(request->methodSignature != NULL, "methodSignature is NULL");
|
||||
jvmtiDeallocate(request->methodSignature);
|
||||
request->methodSignature = NULL;
|
||||
|
||||
/* From now on, do not access the request structure anymore
|
||||
* for this request id, because once we give up the invokerLock it may
|
||||
* be immediately reused by a new invoke request.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user