bluetooth: mesh: check upload slot before release
Check if the slot is not reseved, NULL before try to releas it. Signed-off-by: Alperen Şener <alperen.sener@nordicsemi.no>
This commit is contained in:
parent
a54c18ad31
commit
05e806d31d
1 changed files with 3 additions and 1 deletions
|
@ -477,7 +477,9 @@ static int handle_upload_start(struct bt_mesh_model *mod, struct bt_mesh_msg_ctx
|
|||
/* This will be a no-op if the slot state isn't RESERVED, which is
|
||||
* what we want.
|
||||
*/
|
||||
bt_mesh_dfu_slot_release(srv->upload.slot);
|
||||
if (srv->upload.slot) {
|
||||
bt_mesh_dfu_slot_release(srv->upload.slot);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_BT_MESH_DFD_SRV_OOB_UPLOAD
|
||||
srv->upload.is_oob = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue