[Android] jni: plug leaks

Edward Wang git at videolan.org
Mon Sep 9 23:16:03 CEST 2013


vlc-ports/android | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Mon Sep  9 17:10:09 2013 -0400| [67dd56a395c805a4b7021afb9c973155077d2004] | committer: Edward Wang

jni: plug leaks

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

 vlc-android/jni/libvlcjni-medialist.c |    1 +
 vlc-android/jni/libvlcjni.c           |    1 +
 2 files changed, 2 insertions(+)

diff --git a/vlc-android/jni/libvlcjni-medialist.c b/vlc-android/jni/libvlcjni-medialist.c
index 80ebcd0..6ab3e80 100644
--- a/vlc-android/jni/libvlcjni-medialist.c
+++ b/vlc-android/jni/libvlcjni-medialist.c
@@ -114,6 +114,7 @@ static void vlc_media_list_event_callback(const libvlc_event_t *ev, void *data)
     }
 
 end:
+    (*env)->DeleteLocalRef(env, bundle);
     if (isAttached)
         (*myVm)->DetachCurrentThread(myVm);
 }
diff --git a/vlc-android/jni/libvlcjni.c b/vlc-android/jni/libvlcjni.c
index d2d3629..1fcbb93 100644
--- a/vlc-android/jni/libvlcjni.c
+++ b/vlc-android/jni/libvlcjni.c
@@ -188,6 +188,7 @@ static void vlc_event_callback(const libvlc_event_t *ev, void *data)
     }
 
 end:
+    (*env)->DeleteLocalRef(env, bundle);
     if (isAttached)
         (*myVm)->DetachCurrentThread(myVm);
 }



More information about the Android mailing list