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

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

Merge "Plug vendor privacy memory leak"

parents dbe8c7e1 f1eee2a2
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -172,8 +172,8 @@ typedef uint16_t tBTM_BLE_STATE_MASK;
  (BTM_BLE_STATE_CENTRAL_BIT | BTM_BLE_STATE_PERIPHERAL_BIT)

typedef struct {
  RawAddress* resolve_q_random_pseudo;
  uint8_t* resolve_q_action;
  RawAddress* resolve_q_random_pseudo{nullptr};
  uint8_t* resolve_q_action{nullptr};
  uint8_t q_next;
  uint8_t q_pending;
} tBTM_BLE_RESOLVE_Q;
@@ -269,7 +269,8 @@ typedef struct {
  uint8_t resolving_list_avail_size; /* resolving list available size */
  tBTM_BLE_RESOLVE_Q resolving_list_pend_q; /* Resolving list queue */
  tBTM_BLE_RL_STATE suspended_rl_state;     /* Suspended resolving list state */
  uint8_t* irk_list_mask; /* IRK list availability mask, up to max entry bits */
  /* IRK list availability mask, up to max entry bits */
  uint8_t* irk_list_mask{nullptr};
  tBTM_BLE_RL_STATE rl_state; /* Resolving list state */

  /* current BLE link state */
+1 −1
Original line number Diff line number Diff line
@@ -800,7 +800,7 @@ void btm_ble_resolving_list_init(uint8_t max_irk_list_sz) {
  uint8_t irk_mask_size =
      (max_irk_list_sz % 8) ? (max_irk_list_sz / 8 + 1) : (max_irk_list_sz / 8);

  if (max_irk_list_sz > 0) {
  if (max_irk_list_sz > 0 && p_q->resolve_q_random_pseudo == nullptr) {
    // NOTE: This memory is never freed
    p_q->resolve_q_random_pseudo =
        (RawAddress*)osi_malloc(sizeof(RawAddress) * max_irk_list_sz);