Skip to content
Snippets Groups Projects
Commit b45b8479 authored by Hui Peng's avatar Hui Peng
Browse files

Fix a nullptr-deref in on_create_record_event

Bug: 263545186
Test: manual
Ignore-AOSP-First: security
Change-Id: I0abbb67842850cc2f1298b43dc49a89445b40a43
parent d0fc4262
No related branches found
No related tags found
No related merge requests found
......@@ -350,9 +350,9 @@ void on_create_record_event(int id) {
BTIF_TRACE_DEBUG("Sdp Server %s", __func__);
const sdp_slot_t* sdp_slot = start_create_sdp(id);
tBTA_SERVICE_ID service_id = -1;
bluetooth_sdp_record* record;
/* In the case we are shutting down, sdp_slot is NULL */
if (sdp_slot != NULL) {
bluetooth_sdp_record* record = sdp_slot->record_data;
if (sdp_slot != nullptr && (record = sdp_slot->record_data) != nullptr) {
int handle = -1;
switch (record->hdr.type) {
case SDP_TYPE_MAP_MAS:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment