diff options
author | Mike Lockwood <lockwood@android.com> | 2011-06-09 14:48:11 -0400 |
---|---|---|
committer | Mike Lockwood <lockwood@android.com> | 2011-06-09 14:48:11 -0400 |
commit | b3174c46ade0be4628813a74b317da538e367bc8 (patch) | |
tree | 78653c3f7d8dc59c2ea2ec623e28d2d254c50816 /services/jni | |
parent | 1d3173c3dc93bb4f2efc5b059fec8e7577b3258a (diff) | |
download | frameworks_base-b3174c46ade0be4628813a74b317da538e367bc8.zip frameworks_base-b3174c46ade0be4628813a74b317da538e367bc8.tar.gz frameworks_base-b3174c46ade0be4628813a74b317da538e367bc8.tar.bz2 |
UsbService: Fix JNI reference leak
http://code.google.com/p/android/issues/detail?id=17365
Change-Id: Ice0174e0db2a785d32ac16694ebf3b7ddb1b7fb3
Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'services/jni')
-rw-r--r-- | services/jni/com_android_server_UsbService.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/services/jni/com_android_server_UsbService.cpp b/services/jni/com_android_server_UsbService.cpp index 6aeede2..93f23c3 100644 --- a/services/jni/com_android_server_UsbService.cpp +++ b/services/jni/com_android_server_UsbService.cpp @@ -135,7 +135,7 @@ static int usb_device_removed(const char *devname, void* client_data) { jobject thiz = (jobject)client_data; jstring deviceName = env->NewStringUTF(devname); - env->CallVoidMethod(thiz, method_usbDeviceRemoved, env->NewStringUTF(devname)); + env->CallVoidMethod(thiz, method_usbDeviceRemoved, deviceName); env->DeleteLocalRef(deviceName); checkAndClearExceptionFromCallback(env, __FUNCTION__); return 0; |