Unregister all native methods on unload for kqueue (#10738)
Motivation:
03aafb9cff
did ensure we unregister all native methods when we unload / or fail during load of the native library. Unfortunally it missed to unregister in one case for kqueue.
Modifications:
Add unregister calls to the unload function
Result:
Correctly unregister in all cases
This commit is contained in:
parent
fe5a9f3e32
commit
701eed8762
@ -371,14 +371,17 @@ error:
|
||||
return JNI_ERR;
|
||||
}
|
||||
|
||||
static void netty_kqueue_native_JNI_OnUnLoad(JNIEnv* env, const char* staticPackagePrefix) {
|
||||
netty_unix_limits_JNI_OnUnLoad(env, staticPackagePrefix);
|
||||
netty_unix_errors_JNI_OnUnLoad(env, staticPackagePrefix);
|
||||
netty_unix_filedescriptor_JNI_OnUnLoad(env, staticPackagePrefix);
|
||||
netty_unix_socket_JNI_OnUnLoad(env, staticPackagePrefix);
|
||||
netty_unix_buffer_JNI_OnUnLoad(env, staticPackagePrefix);
|
||||
netty_kqueue_bsdsocket_JNI_OnUnLoad(env, staticPackagePrefix);
|
||||
netty_kqueue_eventarray_JNI_OnUnLoad(env, staticPackagePrefix);
|
||||
static void netty_kqueue_native_JNI_OnUnLoad(JNIEnv* env, const char* packagePrefix) {
|
||||
netty_unix_util_unregister_natives(env, packagePrefix, STATICALLY_CLASSNAME);
|
||||
netty_unix_util_unregister_natives(env, packagePrefix, NATIVE_CLASSNAME);
|
||||
|
||||
netty_unix_limits_JNI_OnUnLoad(env, packagePrefix);
|
||||
netty_unix_errors_JNI_OnUnLoad(env, packagePrefix);
|
||||
netty_unix_filedescriptor_JNI_OnUnLoad(env, packagePrefix);
|
||||
netty_unix_socket_JNI_OnUnLoad(env, packagePrefix);
|
||||
netty_unix_buffer_JNI_OnUnLoad(env, packagePrefix);
|
||||
netty_kqueue_bsdsocket_JNI_OnUnLoad(env, packagePrefix);
|
||||
netty_kqueue_eventarray_JNI_OnUnLoad(env, packagePrefix);
|
||||
}
|
||||
|
||||
static jint JNI_OnLoad_netty_transport_native_kqueue0(JavaVM* vm, void* reserved) {
|
||||
|
Loading…
Reference in New Issue
Block a user