提交 bfc0d482 编写于 作者: R robm

8067680: (sctp) Possible race initializing native IDs

Reviewed-by: chegar, rriggs
上级 4acc0be8
......@@ -315,11 +315,12 @@ void initializeISA
if (isaCls == 0) {
jclass c = (*env)->FindClass(env, "java/net/InetSocketAddress");
CHECK_NULL(c);
isaCtrID = (*env)->GetMethodID(env, c, "<init>",
"(Ljava/net/InetAddress;I)V");
CHECK_NULL(isaCtrID);
isaCls = (*env)->NewGlobalRef(env, c);
CHECK_NULL(isaCls);
(*env)->DeleteLocalRef(env, c);
isaCtrID = (*env)->GetMethodID(env, isaCls, "<init>",
"(Ljava/net/InetAddress;I)V");
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册