Bluetooth: GATT: Fix not updating previous node
When iterating to the subscriptions to be removed the code has to keep a reference to the previous node but it case the subscription matches but doesn't need to be removed it doesn't update the prev node which may corrupt the list in case the next node end up being removed. Change-Id: Ic5448f01bf78d293f93b9a7078a0147385ea1d23 Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
00210386c6
commit
92e8d91332
1 changed files with 1 additions and 0 deletions
|
@ -765,6 +765,7 @@ static void remove_subscriptions(struct bt_conn *conn)
|
|||
gatt_subscription_remove(conn, prev, params);
|
||||
} else {
|
||||
update_subscription(conn, params);
|
||||
prev = node;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue