Bluetooth: Check for NULL pointer dereference

The fix in commit ff9718f8254b96dc313dd998c195c1c3769417ba was not
complete.  In l2cap_logical_link_complete the socket pointer was
dereferenced in two places, the previous fix only handled one of
the locations.

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

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