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

Commit 79cd4eb6 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
Test: manual test
Change-Id: I7a64382b36adca37a8ff0c7e361d89ecdc8f3b55
parent 827542e6
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -436,6 +436,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
@@ -642,6 +643,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