• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

system/bt


Commit MetaInfo

Revisão5edd605227af9a1b9eedf4fd9f02373a47fd49fb (tree)
Hora2019-11-26 10:05:40
AutorZongheng Wang <wangzongheng@goog...>
CommiterZongheng Wang

Mensagem de Log

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)

Mudança Sumário

Diff

--- a/stack/sdp/sdp_discovery.cc
+++ b/stack/sdp/sdp_discovery.cc
@@ -469,6 +469,7 @@ static void process_service_attr_rsp(tCONN_CB* p_ccb, uint8_t* p_reply,
469469 if (!sdp_copy_raw_data(p_ccb, false)) {
470470 SDP_TRACE_ERROR("sdp_copy_raw_data failed");
471471 sdp_disconnect(p_ccb, SDP_ILLEGAL_PARAMETER);
472+ return;
472473 }
473474
474475 #endif
@@ -698,6 +699,7 @@ static void process_service_search_attr_rsp(tCONN_CB* p_ccb, uint8_t* p_reply,
698699 if (!sdp_copy_raw_data(p_ccb, true)) {
699700 SDP_TRACE_ERROR("sdp_copy_raw_data failed");
700701 sdp_disconnect(p_ccb, SDP_ILLEGAL_PARAMETER);
702+ return;
701703 }
702704 #endif
703705