[CrOS MultiDevice] Fix crash in BleConnectionManagerImpl.
When a SecureChannel disconnects due to authentication failures, BleConnectionManagerImpl invokes the relevant failure callback, which then causes ConnectionAttemptBase to cancel the connection attempt. When the attempt is cancelled, the SecureChannel object is deleted via BleConnectionManagerImpl::ProcessPotentialLingeringChannel(), but BleConnectionManagerImpl::HandleSecureChannelDisconnection() assumed that the object was still valid and tried to to remove itself as an observer, causing a segfault. The fix is to check whether the object has been deleted before attempting to call RemoveObserver(). Bug: 905904 Change-Id: Ic593ef4047ff481e218c89028324eb0863131cdc Reviewed-on: https://chromium-review.googlesource.com/c/1352855Reviewed-by:Ryan Hansberry <hansberry@chromium.org> Commit-Queue: Kyle Horimoto <khorimoto@chromium.org> Cr-Commit-Position: refs/heads/master@{#611781}
Showing
This diff is collapsed.
Please register or sign in to comment