Modify Improper deletion of ArrayList
authorJaehong Jo <jaehong.jo@samsung.com>
Mon, 21 Sep 2015 07:44:56 +0000 (16:44 +0900)
committerPatrick Lankswert <patrick.lankswert@intel.com>
Tue, 22 Sep 2015 16:55:52 +0000 (16:55 +0000)
As array list member is not created in runtime, deletion causes memory crash.

Change-Id: Idc15349b70ff77a8446e76488ff3ca13c055e475
Signed-off-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/2829
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Patrick Lankswert <patrick.lankswert@intel.com>
resource/csdk/connectivity/src/bt_edr_adapter/android/caedrutils.c

index 154ef47..bd40b31 100644 (file)
@@ -646,7 +646,6 @@ bool CAEDRNativeIsDeviceSocketInList(JNIEnv *env, const char* remoteAddress)
         }
 
         jstring jni_setAddress = CAEDRNativeGetAddressFromDeviceSocket(env, jarrayObj);
-        (*env)->DeleteLocalRef(env, jarrayObj);
         if (!jni_setAddress)
         {
             OIC_LOG(DEBUG, TAG, "[EDR][Native] jni_setAddress is null");