Fix memory leak of characteristic and primary service lists

This commit is contained in:
Claudio Takahasi 2010-09-20 13:35:05 -03:00 committed by Anderson Lizardo
parent 90e1990f85
commit a66ccf347b

View File

@ -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);