[Android] jni: fix jni leak

Thomas Guillem git at videolan.org
Tue Nov 25 17:34:19 CET 2014


vlc-ports/android | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Nov 21 16:07:04 2014 +0100| [bcb8f0c37186062b99666222775d0dc9dce0d75e] | committer: Thomas Guillem

jni: fix jni leak

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=bcb8f0c37186062b99666222775d0dc9dce0d75e
---

 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;



More information about the Android mailing list