Message ID | 20240702084907.26066-1-r.smirnov@omp.ru |
---|---|
State | Superseded |
Headers | show |
Series | [BlueZ,v1] shared/vcp: add NULL checks to foreach_vocs_service() | expand |
diff --git a/src/shared/vcp.c b/src/shared/vcp.c index b7e17e448..06264a241 100644 --- a/src/shared/vcp.c +++ b/src/shared/vcp.c @@ -2701,6 +2701,9 @@ static void foreach_vocs_service(struct gatt_db_attribute *attr, struct bt_vcp *vcp = user_data; struct bt_vocs *vocs = vcp_get_vocs(vcp); + if (!vocs || !attr) + return; + vocs->service = attr; gatt_db_service_set_claimed(attr, true);