OSDN Git Service

btm_proc_smp_cback: Don't access p_dev_rec if freed
authorHansong Zhang <hsz@google.com>
Thu, 10 Jan 2019 02:18:17 +0000 (18:18 -0800)
committerHansong Zhang <hsz@google.com>
Tue, 22 Jan 2019 21:47:33 +0000 (21:47 +0000)
commit953dd279502980b1d8d30656eb78c6445a6e31f7
treebdcf956f6613f36bef49d2717a39ef3e2aa85ee8
parent3fd73e4ad26a1b79589d197a8e5ec288110d2f2b
btm_proc_smp_cback: Don't access p_dev_rec if freed

In btm_proc_smp_cback(), return after p_dev_rec is freed in the middle
to prevent use after free

Bug: 120612744
Test: Use ASAN build; connect to a LE device and wait for timeout
Change-Id: Ic9d0eaeb62a1a1b24884146ca82f4104fabc5bac
stack/btm/btm_ble.cc