summaryrefslogtreecommitdiffstats
path: root/media/jni
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2013-11-13 15:10:40 -0800
committerMarco Nelissen <marcone@google.com>2014-03-07 14:10:52 -0800
commit0bb17193cc764ea6c122a6a763cba7ece78ef8e7 (patch)
treeae11d0b54d7b83e1df5254d0f15a49cbdd792fa7 /media/jni
parentaefa427c27396bef64ee37d5c4d94e0a63cf7b05 (diff)
downloadframeworks_base-0bb17193cc764ea6c122a6a763cba7ece78ef8e7.zip
frameworks_base-0bb17193cc764ea6c122a6a763cba7ece78ef8e7.tar.gz
frameworks_base-0bb17193cc764ea6c122a6a763cba7ece78ef8e7.tar.bz2
Fix a JNI local reference leak in JNIMediaPlayerListener::notify.
Bug: https://code.google.com/p/android/issues/detail?id=62137 b/12603577 Change-Id: I776cd83a66de37fdbbe8af367bf1b26e5e0c7247
Diffstat (limited to 'media/jni')
-rw-r--r--media/jni/android_media_MediaPlayer.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/media/jni/android_media_MediaPlayer.cpp b/media/jni/android_media_MediaPlayer.cpp
index d134667..4be9cd6 100644
--- a/media/jni/android_media_MediaPlayer.cpp
+++ b/media/jni/android_media_MediaPlayer.cpp
@@ -115,6 +115,7 @@ void JNIMediaPlayerListener::notify(int msg, int ext1, int ext2, const Parcel *o
nativeParcel->setData(obj->data(), obj->dataSize());
env->CallStaticVoidMethod(mClass, fields.post_event, mObject,
msg, ext1, ext2, jParcel);
+ env->DeleteLocalRef(jParcel);
}
} else {
env->CallStaticVoidMethod(mClass, fields.post_event, mObject,