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

Commit fd695006 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "legacy: null check stack/rfcomm/rfc_l2cap_if::RFCOMM_ConfigInd"

parents af7851ee 5df2ffe9
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -22,12 +22,15 @@
 *
 ******************************************************************************/

#include <base/logging.h>

#include <cstddef>
#include <cstdint>

#include "bt_target.h"
#include "common/time_util.h"
#include "osi/include/allocator.h"
#include "osi/include/log.h"
#include "osi/include/osi.h"  // UNUSED_ATTR
#include "stack/include/bt_hdr.h"
#include "stack/include/bt_types.h"
@@ -36,8 +39,6 @@
#include "stack/rfcomm/rfc_int.h"
#include "types/raw_address.h"

#include <base/logging.h>

/*
 * Define Callback functions to be called by L2CAP
*/
@@ -177,6 +178,11 @@ void RFCOMM_ConnectCnf(uint16_t lcid, uint16_t result) {
 *
 ******************************************************************************/
void RFCOMM_ConfigInd(uint16_t lcid, tL2CAP_CFG_INFO* p_cfg) {
  if (p_cfg == nullptr) {
    LOG_ERROR("Received l2cap configuration info with nullptr");
    return;
  }

  tRFC_MCB* p_mcb = rfc_find_lcid_mcb(lcid);

  if (!p_mcb) {