diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2007-01-19 22:45:46 +0000 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2007-01-19 22:45:46 +0000 |
commit | 717a515646d0fea3c7e30fb5093f96ee54cfb44b (patch) | |
tree | f9a63535cfa0b1de6199e515a28875e24b9396d8 | |
parent | c100da438a340f1f31c749dfe56c921380800fd2 (diff) |
Use g_strdup for trusted_devices
-rw-r--r-- | hcid/dbus-service.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hcid/dbus-service.c b/hcid/dbus-service.c index 1258cd06..1c0e1e7b 100644 --- a/hcid/dbus-service.c +++ b/hcid/dbus-service.c @@ -108,7 +108,7 @@ static void service_free(struct service *service) g_free(service->opts); if (service->trusted_devices) { - g_slist_foreach(service->trusted_devices, (GFunc) free, NULL); + g_slist_foreach(service->trusted_devices, (GFunc) g_free, NULL); g_slist_free(service->trusted_devices); } @@ -550,7 +550,7 @@ static DBusHandlerResult set_trusted(DBusConnection *conn, if (!reply) return DBUS_HANDLER_RESULT_NEED_MEMORY; - service->trusted_devices = g_slist_append(service->trusted_devices, strdup(address)); + service->trusted_devices = g_slist_append(service->trusted_devices, g_strdup(address)); return send_message_and_unref(conn, reply); } @@ -607,7 +607,7 @@ static DBusHandlerResult remove_trust(DBusConnection *conn, paddress = l->data; service->trusted_devices = g_slist_remove(service->trusted_devices, l->data); - free(paddress); + g_free(paddress); return send_message_and_unref(conn, reply); } |