diff options
author | Casper Bonde <c.bonde@samsung.com> | 2016-01-04 16:13:13 +0100 |
---|---|---|
committer | The Android Automerger <android-build@google.com> | 2016-02-16 12:28:33 -0800 |
commit | eb6e43c6a32f167d656d6b7fa4f3c61df4b239db (patch) | |
tree | c4e4461ce9bc6fca6746b94ea3f33b98e7f526fa | |
parent | b026d70378fa286249223924f3e144a6a3ab4b7c (diff) | |
download | android_packages_apps_Bluetooth-eb6e43c6a32f167d656d6b7fa4f3c61df4b239db.tar.gz android_packages_apps_Bluetooth-eb6e43c6a32f167d656d6b7fa4f3c61df4b239db.tar.bz2 android_packages_apps_Bluetooth-eb6e43c6a32f167d656d6b7fa4f3c61df4b239db.zip |
Fix memory leak in Bluetooth AVRCP JNI
When rebasing change-id I3941793f9843abf4afa5ffbee40d1d01c118b29b
later change bbb4110b455b3aa29106d5b4f0a37e1be8e09475 in AOSP,
a memory leak fix was removed by accident. This patch re-enables
the memory leak fix.
Bug: 26383160
Change-Id: I70fd2ea00f6135803f92aad3adda9ce38f47cc32
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
(cherry picked from commit 3a4b8693ee49932247a96099942fa1cecb4670bc)
-rw-r--r-- | jni/com_android_bluetooth_avrcp.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/jni/com_android_bluetooth_avrcp.cpp b/jni/com_android_bluetooth_avrcp.cpp index 5207f4d99..ba1d78bbd 100644 --- a/jni/com_android_bluetooth_avrcp.cpp +++ b/jni/com_android_bluetooth_avrcp.cpp @@ -72,8 +72,7 @@ static void btavrcp_remote_features_callback(bt_bdaddr_t* bd_addr, btrc_remote_f } checkAndClearExceptionFromCallback(sCallbackEnv, __FUNCTION__); - /* TODO: I think we leak the addr object, we should add a - * sCallbackEnv->DeleteLocalRef(addr) */ + sCallbackEnv->DeleteLocalRef(addr); } static void btavrcp_get_play_status_callback() { |