cf_set() returns 0 when no cfg is available #25447
Labels
area: Bluetooth
bug
The issue is a bug, or the PR is fixing a bug
priority: low
Low impact/importance bug
In gatt.c @ cf_set(), the function returns with success (0) when no cfg is available.
cfg = find_cf_cfg_by_addr(id, &addr); if (!cfg) { cfg = find_cf_cfg(NULL); if (!cfg) { BT_ERR("Unable to restore CF: no cfg left"); return 0; } }
The function should probably return
return -ENOMEM;
when no cfg is available.
The impact on my progress is currently not assessed. Just found this bug as part of another bug-hunt.
The text was updated successfully, but these errors were encountered: