8303071: Memory leaks in libjdwp
Reviewed-by: sspitsyn
This commit is contained in:
parent
f113b04ab9
commit
2cf8b8607d
@ -508,7 +508,7 @@ transport_startTransport(jboolean isServer, char *name, char *address,
|
||||
trans = info->transport;
|
||||
|
||||
if (isServer) {
|
||||
char *retAddress;
|
||||
char *retAddress = NULL;
|
||||
char *launchCommand;
|
||||
jvmtiError error;
|
||||
int len;
|
||||
@ -607,9 +607,13 @@ transport_startTransport(jboolean isServer, char *name, char *address,
|
||||
name, retAddress));
|
||||
}
|
||||
}
|
||||
jvmtiDeallocate(retAddress);
|
||||
return JDWP_ERROR(NONE);
|
||||
|
||||
handleError:
|
||||
if (retAddress != NULL) {
|
||||
jvmtiDeallocate(retAddress);
|
||||
}
|
||||
freeTransportInfo(info);
|
||||
} else {
|
||||
/*
|
||||
|
@ -243,6 +243,7 @@ util_initialize(JNIEnv *env)
|
||||
}
|
||||
localSystemThreadGroup = groups[0];
|
||||
saveGlobalRef(env, localSystemThreadGroup, &(gdata->systemThreadGroup));
|
||||
jvmtiDeallocate(groups);
|
||||
|
||||
/* Get some basic Java property values we will need at some point */
|
||||
gdata->property_java_version
|
||||
|
Loading…
Reference in New Issue
Block a user