In attach_current_thread we reach a point where we "new" a JavaThread object for the current thread. After that there are two places where we return JNI_ERR, the first of which does not clean up the JavaThread that was created. Similarly create_vm can also leak the JavaThread and associated structures.
|