Merge "Fix coverty issue in gatt-client" into tizen
[platform/core/connectivity/bluetooth-frwk.git] / bt-oal / bluez_hal / src / bt-hal-gatt-client.c
index 6d6ef88..81b28d7 100644 (file)
@@ -2747,12 +2747,14 @@ static bt_status_t __hal_configure_mtu(int conn_id, int mtu)
        conn = _bt_hal_get_system_gconn();
        if (conn == NULL) {
                ERR("conn NULL");
+               g_free(conn_mtu);
                return BT_STATUS_FAIL;
        }
 
        gattc_client = __bt_find_gatt_client_info_from_conn_id(conn_id);
        if (gattc_client == NULL) {
                INFO("GATT client conn info not found");
+               g_free(conn_mtu);
                return BT_STATUS_FAIL;
        }
 
@@ -2762,6 +2764,7 @@ static bt_status_t __hal_configure_mtu(int conn_id, int mtu)
        device_path = _bt_hal_get_device_object_path(device_address);
        if (device_path == NULL) {
                ERR("device_path NULL : [%s]", device_address);
+               g_free(conn_mtu);
                return BT_STATUS_FAIL;
        }
 
@@ -2772,6 +2775,7 @@ static bt_status_t __hal_configure_mtu(int conn_id, int mtu)
        g_free(device_path);
        if (NULL == device_proxy) {
                ERR("device_proxy returned NULL");
+               g_free(conn_mtu);
                return BT_STATUS_FAIL;
        }