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

Commit f24cbdb3 authored by Pavlin Radoslavov's avatar Pavlin Radoslavov Committed by android-build-merger
Browse files

Free p_pending_data from tBNEP_CONN to avoid potential memory leaks am: 309bc9a5

am: 503ce455

Change-Id: I4e93ec83fac0bfa764f7b78bf33d0ba088e5bc3a
parents 2389b6a2 503ce455
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -565,6 +565,8 @@ static void bnep_data_ind (UINT16 l2cap_cid, BT_HDR *p_buf)
            p_bcb->con_state != BNEP_STATE_CONNECTED &&
            extension_present && p && rem_len)
        {
            if (p_bcb->p_pending_data)
                GKI_freebuf (p_bcb->p_pending_data);
            p_bcb->p_pending_data = (BT_HDR *)GKI_getbuf (rem_len + sizeof(BT_HDR));
            if (p_bcb->p_pending_data)
            {
+2 −0
Original line number Diff line number Diff line
@@ -150,6 +150,8 @@ void bnepu_release_bcb (tBNEP_CONN *p_bcb)

    /* Drop any response pointer we may be holding */
    p_bcb->con_state        = BNEP_STATE_IDLE;
    if (p_bcb->p_pending_data)
        GKI_freebuf (p_bcb->p_pending_data);
    p_bcb->p_pending_data   = NULL;

    /* Free transmit queue */