g_free should be used for only those memory allocations
done through glib APIs
Change-Id: I5d5275574b0d273594f86786956d86355794db94
return;
g_free(ad.local_name);
- ad.local_name = strdup(name);
+ ad.local_name = g_strdup(name);
g_dbus_emit_property_changed(conn, AD_PATH, AD_IFACE, "LocalName");
}
bt_uuid_to_uuid128(&uuid, &u128);
bt_uuid_to_string(&u128, uuidstr, sizeof(uuidstr));
- filter->uuids = g_slist_prepend(filter->uuids, strdup(uuidstr));
+ filter->uuids = g_slist_prepend(filter->uuids, g_strdup(uuidstr));
dbus_message_iter_next(&arriter);
}