Destroy ap handle after use
authorSaurav Babu <saurav.babu@samsung.com>
Fri, 4 Mar 2016 07:05:07 +0000 (12:35 +0530)
committerMadan Lanka <lanka.madan@samsung.com>
Mon, 7 Mar 2016 01:18:12 +0000 (01:18 +0000)
wifi_get_connected_ap() returns ap handle with allocated memory which
needs to be destroyed after use.

Change-Id: Ic157ddd973504b0a20ae87d2286fab5bc42de3f4
Signed-off-by: Saurav Babu <saurav.babu@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/5409
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Madan Lanka <lanka.madan@samsung.com>
service/resource-hosting/SampleApp/tizen/sampleConsumer/src/oicapp-utils.c

index 075343c..b4b6eb5 100644 (file)
@@ -79,9 +79,11 @@ char* oicapp_util_wifi()
     if(WIFI_ERROR_NONE != ret)
     {
         ERR("wifi_ap_get_ip_address() Fail");
+        wifi_ap_destroy(ap);
         return NULL;
     }
 
+    wifi_ap_destroy(ap);
     return ip_addr;
 }