Fix the svace issue (11726, 176047, 183477) 75/122975/2 submit/tizen/20170404.073146
authorDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 4 Apr 2017 04:48:29 +0000 (13:48 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 4 Apr 2017 06:06:14 +0000 (15:06 +0900)
Change-Id: Ia399f87f8d869f18afe7fef883dfea36a891b9e8
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
src/bluetooth-audio.c
src/bluetooth-common.c

index 623cc777ebf9970c38a4d20e464e6643f7c4c097..ba11d530538da5238cc23ef0dd4eedad16dfff9f 100644 (file)
@@ -757,6 +757,8 @@ int bt_ag_switch_headset(const char *remote_addr)
        if (error != BT_ERROR_NONE)
                BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error), error);
 
+       g_free(addr);
+
        return error;
 }
 
index 42c1b53e0e3850f9b83de45dcdb01f7c02bf33c3..7d1b12e7de525aba2593ac2eb1acd0309696b51c 100644 (file)
@@ -3591,6 +3591,7 @@ int _bt_gatt_client_update_all(bt_gatt_client_h client)
        ret = _bt_get_error_code(ret);
        if (ret != BT_ERROR_NONE) {
                BT_ERR("bluetooth_gatt_get_primary_services is failed");
+               g_free(prim_svc);
                return ret;
        }
 
@@ -3678,6 +3679,7 @@ int _bt_gatt_client_update_all(bt_gatt_client_h client)
        g_strfreev(prim_svc->handle);
 
        g_free(prim_svc);
+       prim_svc = NULL;
 
        if (svc_list == NULL)
                return BT_ERROR_OPERATION_FAILED;