This fixes a potential NULL-pointer reference crash in case
btm_find_dev() returns NULL.
Test: mm -j 8
Change-Id: Ic154b872ca84b4e9e8bc57803a4d9ee7c1665204
if (res == BTM_SUCCESS)
{
- if ((p_dev_rec = btm_find_dev (bd_addr)) != NULL)
+ if ((p_dev_rec = btm_find_dev (bd_addr)) != NULL) {
p_dev_rec->sec_flags |= BTM_SEC_LINK_KEY_AUTHED;
p_dev_rec->sec_flags |= BTM_SEC_16_DIGIT_PIN_AUTHED;
+ }
}
btsnd_hcic_user_conf_reply (bd_addr, true);