Bluetooth: Added NULL checks to avoid NULL pointer dereferences

This patch fixed the NULL pointer dereferences and Array
Index Out of Bounds exceptions seen in the code space of
bluedroid in Bluetooth.

CRs-Fixed: 792272
Change-Id: Id8775d9d14efb4d52c3cee26e7a2e77a22bcf3ba
6 files changed