OSDN Git Service

Fix invalid iterator access in GATTS_StopService
authorChienyuan <chienyuanhuang@google.com>
Wed, 30 Jan 2019 07:57:19 +0000 (15:57 +0800)
committerChienyuan <chienyuanhuang@google.com>
Wed, 30 Jan 2019 07:57:19 +0000 (15:57 +0800)
Bug: 113575306
Test: manual
Change-Id: I2360b187ed10617ddd08e61db1689d631a89767d

stack/gatt/gatt_api.cc

index e8a1b0d..3d37a6b 100644 (file)
@@ -382,6 +382,7 @@ void GATTS_StopService(uint16_t service_handle) {
   if (it == gatt_cb.srv_list_info->end()) {
     LOG(ERROR) << __func__ << ": service_handle=" << loghex(service_handle)
                << " is not in use";
+    return;
   }
 
   if (it->sdp_handle) {