mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-16 16:54:38 +08:00
Fix memory leak of characteristic and primary service lists
This commit is contained in:
parent
90e1990f85
commit
a66ccf347b
@ -141,6 +141,7 @@ static void primary_free(void *user_data)
|
||||
}
|
||||
|
||||
g_slist_foreach(prim->chars, (GFunc) characteristic_free, NULL);
|
||||
g_slist_free(prim->chars);
|
||||
g_free(prim->path);
|
||||
g_free(prim);
|
||||
}
|
||||
@ -150,6 +151,7 @@ static void gatt_service_free(void *user_data)
|
||||
struct gatt_service *gatt = user_data;
|
||||
|
||||
g_slist_foreach(gatt->primary, (GFunc) primary_free, NULL);
|
||||
g_slist_free(gatt->primary);
|
||||
g_attrib_unref(gatt->attrib);
|
||||
g_free(gatt->path);
|
||||
g_free(gatt);
|
||||
|
Loading…
Reference in New Issue
Block a user