projects
/
platform
/
core
/
api
/
bluetooth.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9d717e5
)
Fix pointer corruption in gatt_server_deinitialize
32/267432/1
author
Ayush Garg
<ayush.garg@samsung.com>
Fri, 3 Dec 2021 10:40:05 +0000
(16:10 +0530)
committer
Ayush Garg
<ayush.garg@samsung.com>
Fri, 3 Dec 2021 10:40:05 +0000
(16:10 +0530)
The next node pointer of the gatt_server_list must be
stored before removing the current node.
Change-Id: I416a3a17d0c314f246449d6f458cffe6daaff2c3
src/bluetooth-gatt.c
patch
|
blob
|
history
diff --git
a/src/bluetooth-gatt.c
b/src/bluetooth-gatt.c
index
33b0b47
..
5e0791f
100644
(file)
--- a/
src/bluetooth-gatt.c
+++ b/
src/bluetooth-gatt.c
@@
-2725,8
+2725,9
@@
int bt_gatt_server_deinitialize(void)
if (is_gatt_server_initialized) {
GSList *l;
- for (l = gatt_server_list; l;
l = g_slist_next(l)
) {
+ for (l = gatt_server_list; l;) {
bt_gatt_server_s *serv = l->data;
+ l = g_slist_next(l);
bt_gatt_server_destroy(serv);
}
g_slist_free(gatt_server_list);