[Android] [PATCH 1/4] jni: fix jni leak

Thomas Guillem thomas at gllm.fr
Fri Nov 21 16:36:09 CET 2014


---
 libvlc/jni/vout.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libvlc/jni/vout.c b/libvlc/jni/vout.c
index 06dc605..0dcf1bf 100644
--- a/libvlc/jni/vout.c
+++ b/libvlc/jni/vout.c
@@ -161,6 +161,8 @@ int jni_ConfigureSurface(jobject jsurf, int width, int height, int hal, bool *co
     if (ret >= 0 && configured)
         *configured = ret == 1;
 
+    (*p_env)->DeleteLocalRef(p_env, clz);
+
     if (isAttached)
         jni_detach_thread();
     return ret == -1 ? -1 : 0;
-- 
2.1.1



More information about the Android mailing list