Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d76a2d2b authored by Zongheng Wang's avatar Zongheng Wang
Browse files

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)
parent 3853885a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -469,6 +469,7 @@ static void process_service_attr_rsp(tCONN_CB* p_ccb, uint8_t* p_reply,
      if (!sdp_copy_raw_data(p_ccb, false)) {
        SDP_TRACE_ERROR("sdp_copy_raw_data failed");
        sdp_disconnect(p_ccb, SDP_ILLEGAL_PARAMETER);
        return;
      }

#endif
@@ -698,6 +699,7 @@ static void process_service_search_attr_rsp(tCONN_CB* p_ccb, uint8_t* p_reply,
  if (!sdp_copy_raw_data(p_ccb, true)) {
    SDP_TRACE_ERROR("sdp_copy_raw_data failed");
    sdp_disconnect(p_ccb, SDP_ILLEGAL_PARAMETER);
    return;
  }
#endif