From 594d505cc1b87a591faf4b73244c8232b3e20bca Mon Sep 17 00:00:00 2001 From: Carmen Alvarez Date: Wed, 27 Jul 2016 19:10:16 +0200 Subject: [PATCH] Fix crash in msjava.c regarding releasing JNI references. --- src/utils/msjava.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/msjava.c b/src/utils/msjava.c index 054a44061..14fd739f9 100644 --- a/src/utils/msjava.c +++ b/src/utils/msjava.c @@ -32,7 +32,7 @@ static pthread_key_t jnienv_key; * (see LinphoneCoreFactory.setLogHandler() ). **/ void _android_key_cleanup(void *data){ - JNIEnv* env=(JNIEnv*)pthread_getspecific(jnienv_key); + JNIEnv *env = (JNIEnv*) data; if (env != NULL) { ms_message("Thread end, detaching jvm from current thread"); @@ -102,4 +102,4 @@ JNIEXPORT void JNICALL Java_org_linphone_mediastream_Log_e(JNIEnv* env, jobject if (msg) (*env)->ReleaseStringUTFChars(env, jmsg, msg); } -#endif \ No newline at end of file +#endif