From: Wootak Jung Date: Tue, 1 Dec 2020 23:50:14 +0000 (+0900) Subject: Fix svace issues X-Git-Tag: accepted/tizen/unified/20201202.124931^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F19%2F248719%2F1;p=platform%2Fcore%2Fapi%2Fbluetooth.git Fix svace issues Change-Id: I529d4113f1bbfffd5a9459dba3f7f564ebf792d0 Signed-off-by: Wootak Jung --- diff --git a/src/bluetooth-otp.c b/src/bluetooth-otp.c index 82ff057..7a68e85 100644 --- a/src/bluetooth-otp.c +++ b/src/bluetooth-otp.c @@ -536,7 +536,6 @@ static int __bt_opt_update_oacp_control_point(bt_otp_client_s *otp_client_s, bt_ if (ret != BLUETOOTH_ERROR_NONE) { BT_ERR("Failed to discover CCCD for OACP Control point"); - bluetooth_gatt_free_desc_property(&desc_property); return ret; } if (otp_client_s->otp_oacp_control_point) @@ -550,6 +549,7 @@ static int __bt_opt_update_oacp_control_point(bt_otp_client_s *otp_client_s, bt_ BT_DBG("OACP Control point handle [%s]", otp_client_s->otp_oacp_control_point); BT_DBG("OACP Control point CCCD handle [%s]", otp_client_s->otp_oacp_cccd); + bluetooth_gatt_free_desc_property(&desc_property); return ret; } @@ -567,7 +567,6 @@ static int __bt_opt_update_olcp_control_point(bt_otp_client_s *otp_client_s, bt_ if (ret != BLUETOOTH_ERROR_NONE) { BT_ERR("Failed to discover CCCD for OLCP Control point"); - bluetooth_gatt_free_desc_property(&desc_property); return ret; } if (otp_client_s->otp_olcp_control_point) @@ -581,6 +580,7 @@ static int __bt_opt_update_olcp_control_point(bt_otp_client_s *otp_client_s, bt_ BT_DBG("OLCP Control point handle [%s]", otp_client_s->otp_olcp_control_point); BT_DBG("OLCP Control point CCCD handle [%s]", otp_client_s->otp_olcp_cccd); + bluetooth_gatt_free_desc_property(&desc_property); return ret; } @@ -710,7 +710,6 @@ static int __bt_opt_update_object_changed(bt_otp_client_s *otp_client_s, bt_gatt if (ret != BLUETOOTH_ERROR_NONE) { BT_ERR("Failed to discover CCCD for Object Changed Charc"); - bluetooth_gatt_free_desc_property(&desc_property); return ret; } @@ -727,6 +726,7 @@ static int __bt_opt_update_object_changed(bt_otp_client_s *otp_client_s, bt_gatt BT_DBG("OTP Object Changed handle [%s]", otp_client_s->otp_obj_changed_obj_path); BT_DBG("OTP Object Changed CCCD handle [%s]", otp_client_s->otp_obj_changed_cccd); + bluetooth_gatt_free_desc_property(&desc_property); return ret; } diff --git a/tests/test/bt_unit_test.c b/tests/test/bt_unit_test.c index 4607f03..3a33ef7 100644 --- a/tests/test/bt_unit_test.c +++ b/tests/test/bt_unit_test.c @@ -5066,11 +5066,10 @@ int test_input_callback(void *data) ret = bt_adapter_le_set_advertising_device_name(advertiser, BT_ADAPTER_LE_PACKET_SCAN_RESPONSE, true); - if (ret != BT_ERROR_NONE) { + if (ret != BT_ERROR_NONE) TC_PRT("set device name [0x%04x]", ret); - return 0; - } + return 0; default: TC_PRT("No adv data"); break;