system/bt
修訂 | c20f248f7530252c749004c1efe6e1074f92e72d (tree) |
---|---|
時間 | 2020-01-03 07:56:23 |
作者 | Zongheng Wang <wangzongheng@goog...> |
Commiter | Manjae Park |
SDP: add return after SDP disconnection
A return is needed after sdp_disconnect(). It is the logic
expected and it prevents the use of p_ccb after it's freed.
Bug: 144177780
Bug: 117105007
Test: manual test
Change-Id: I7a64382b36adca37a8ff0c7e361d89ecdc8f3b55
(cherry picked from commit 30efc8c90a846460359a489e17e1461c725958b3)
(cherry picked from commit 5edd605227af9a1b9eedf4fd9f02373a47fd49fb)
@@ -474,6 +474,7 @@ static void process_service_attr_rsp(tCONN_CB* p_ccb, uint8_t* p_reply, | ||
474 | 474 | if (!sdp_copy_raw_data(p_ccb, false)) { |
475 | 475 | SDP_TRACE_ERROR("sdp_copy_raw_data failed"); |
476 | 476 | sdp_disconnect(p_ccb, SDP_ILLEGAL_PARAMETER); |
477 | + return; | |
477 | 478 | } |
478 | 479 | |
479 | 480 | #endif |
@@ -703,6 +704,7 @@ static void process_service_search_attr_rsp(tCONN_CB* p_ccb, uint8_t* p_reply, | ||
703 | 704 | if (!sdp_copy_raw_data(p_ccb, true)) { |
704 | 705 | SDP_TRACE_ERROR("sdp_copy_raw_data failed"); |
705 | 706 | sdp_disconnect(p_ccb, SDP_ILLEGAL_PARAMETER); |
707 | + return; | |
706 | 708 | } |
707 | 709 | #endif |
708 | 710 |