Message ID | 20240628074750.35992-1-r.smirnov@omp.ru |
---|---|
State | New |
Headers | show |
Series | [BlueZ,v1] core: add NULL check to adapter_service_remove() | expand |
diff --git a/src/adapter.c b/src/adapter.c index bdc5bf920..57e4dcd54 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -1349,6 +1349,10 @@ int adapter_service_add(struct btd_adapter *adapter, sdp_record_t *rec) void adapter_service_remove(struct btd_adapter *adapter, uint32_t handle) { sdp_record_t *rec; + + if (!adapter) + return; + /* * If the controller does not support BR/EDR operation, * there is no point in trying to remote SDP records.