• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

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

system/bt


Commit MetaInfo

修訂19547d22872708095470ef4aad7100d4f112b940 (tree)
時間2020-01-03 07:56:04
作者Zongheng Wang <wangzongheng@goog...>
CommiterManjae Park

Log Message

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)

Change Summary

差異

--- a/stack/sdp/sdp_discovery.cc
+++ b/stack/sdp/sdp_discovery.cc
@@ -471,6 +471,7 @@ static void process_service_attr_rsp(tCONN_CB* p_ccb, uint8_t* p_reply,
471471 if (!sdp_copy_raw_data(p_ccb, false)) {
472472 SDP_TRACE_ERROR("sdp_copy_raw_data failed");
473473 sdp_disconnect(p_ccb, SDP_ILLEGAL_PARAMETER);
474+ return;
474475 }
475476
476477 #endif
@@ -700,6 +701,7 @@ static void process_service_search_attr_rsp(tCONN_CB* p_ccb, uint8_t* p_reply,
700701 if (!sdp_copy_raw_data(p_ccb, true)) {
701702 SDP_TRACE_ERROR("sdp_copy_raw_data failed");
702703 sdp_disconnect(p_ccb, SDP_ILLEGAL_PARAMETER);
704+ return;
703705 }
704706 #endif
705707