Memory Leak when UUID is not valid.
authorAmit Kumar Verma <ak.verma@samsung.com>
Fri, 17 Jul 2015 08:27:04 +0000 (13:57 +0530)
committerErich Keane <erich.keane@intel.com>
Mon, 20 Jul 2015 16:07:18 +0000 (16:07 +0000)
When UUID is not valid then in case free the temp UUID memory.

Change-Id: I1abe5f13feaf2c1edc97f4fc2e1ac585c9aa3297
Signed-off-by: Amit Kumar Verma <ak.verma@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1713
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Erich Keane <erich.keane@intel.com>
resource/csdk/connectivity/src/bt_le_adapter/tizen/cableclient.c

index 9bb3e70..1fba87b 100644 (file)
@@ -342,6 +342,12 @@ bool CABleGattCharacteristicsDiscoveredCb(int result,
             return false;
         }
     }
+    else
+    {
+        OICFree(uuid);
+        OIC_LOG(ERROR, TZ_BLE_CLIENT_TAG , "service_uuid characteristics is UNKNOWN");
+        return false;
+    }
 
     OIC_LOG(DEBUG, TZ_BLE_CLIENT_TAG, "OUT");
     return true;