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

Commit e40b1345 authored by Paul Wang's avatar Paul Wang Committed by Gerrit Code Review
Browse files

Merge "Fix AVRCP coverity - dereference after null check" into main

parents 48935ad5 c60d59c2
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -344,7 +344,10 @@ void ConnectionHandler::AcceptorControlCb(uint8_t handle, uint8_t event,
  switch (event) {
  switch (event) {
    case AVRC_OPEN_IND_EVT: {
    case AVRC_OPEN_IND_EVT: {
      LOG(INFO) << __PRETTY_FUNCTION__ << ": Connection Opened Event";
      LOG(INFO) << __PRETTY_FUNCTION__ << ": Connection Opened Event";
      if (btif_av_src_sink_coexist_enabled() && peer_addr != NULL &&
      if (peer_addr == NULL) {
        return;
      }
      if (btif_av_src_sink_coexist_enabled() &&
          btif_av_peer_is_connected_source(*peer_addr)) {
          btif_av_peer_is_connected_source(*peer_addr)) {
        LOG(WARNING) << "peer is src, close new avrcp cback";
        LOG(WARNING) << "peer is src, close new avrcp cback";
        if (device_map_.find(handle) != device_map_.end()) {
        if (device_map_.find(handle) != device_map_.end()) {