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

Commit 8abf344b authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "hfp: Check if cb was allocated" am: 161e7eac

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1737778

Change-Id: Idabaf440607a77d150f0835fb1187e9462b1709f
parents 0ba0fea9 161e7eac
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -827,6 +827,11 @@ static void btif_hf_client_upstreams_evt(uint16_t event, char* p_param) {
    BTIF_TRACE_DEBUG("%s: event BTA_HF_CLIENT_OPEN_EVT allocating block",
                     __func__);
    cb = btif_hf_client_allocate_cb();
    if (cb == NULL) {
      BTIF_TRACE_ERROR("%s: event BTA_HF_CLIENT_OPEN_EVT failed to allocate cb",
                       __func__, event);
      return;
    }
    cb->handle = p_data->open.handle;
    cb->peer_bda = p_data->open.bd_addr;
  } else if (cb == NULL) {