BT_EXPORT_API int bluetooth_gatt_free_service_property(bt_gatt_service_property_t *svc_pty)
{
- int i;
-
BT_CHECK_PARAMETER(svc_pty, return);
g_free(svc_pty->uuid);
- g_free(svc_pty->handle);
- if (svc_pty->include_handles.count > 0) {
- for (i = 0; i < svc_pty->include_handles.count; i++)
- g_free(svc_pty->include_handles.handle[i]);
- g_free(svc_pty->include_handles.handle);
- }
- if (svc_pty->char_handle.count > 0) {
- for (i = 0; i < svc_pty->char_handle.count; i++)
- g_free(svc_pty->char_handle.handle[i]);
- g_free(svc_pty->char_handle.handle);
- }
memset(svc_pty, 0, sizeof(bt_gatt_service_property_t));