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

Commit 839637c8 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

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

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

Change-Id: Ic8fbffea021e8a041f40ffac5d400d8f1a99d058
parents dbd73283 8abf344b
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) {