Bluetooth: Check for NULL pointer dereference

Possible for l2cap_logical_link_complete handler to be scheduled
twice with mis-behaving PAL. Since handler clears the socket pointer
must check for NULL socket pointer.

This fixes an infrequent crash when performing OPP or FTP transfer
over AMP (Bluetooth 3.0+HS).

CRs-fixed: 355451
Change-Id: I2e78529f4f1e3b411af13fe6a68a49e724a581ee
Signed-off-by: Peter Krystad <pkrystad@codeaurora.org>
1 file changed