"bta/git@repo.buzztime.com:halo/system_bt.git" did not exist on "90715aad34cdead03fc22bc18891c04838e90e87"
Mike J. Chen
authored
The GATT event handler was telling the BTA dispatcher that
it would always free the GKI msg buffers itself, but in fact
this wasn't true. There were some cases where the buffer is
queued and freed later (queued in p_clcb->p_q_cmd for later
access and freeing), but many times the event handlers
(like bta_gattc_ci_save()) don't queue the buffer and don't
free it, causing a GKI buffer leak.
Also, prevent a double free case (not certain it happens, but
in theory it could) if bta_gattc_sm_execute() queues a buffer
in bta_gattc_disc_cmpl().
Lastly, remove held flag since it's redundant with whether
p_q_cmd is null or not. Just go with one source of truth and
not have one shadow the other.
Change-Id: I1bd43919b8a2e125076e26cd6a3a08480b3e7e2d
Signed-off-by:
Mike J. Chen <mjchen@google.com>