summaryrefslogtreecommitdiffstats
path: root/hcid/dbus-hci.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2007-02-26 13:44:45 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2007-02-26 13:44:45 +0000
commit3d16152fd30f2570ad8e9bb2427045e6fd317ce3 (patch)
tree6d92771a88707cc2b5693bf0de5195d077a0bba0 /hcid/dbus-hci.c
parentf3695d5fc4559135a5c97ffbcb38961fbc1bb0d1 (diff)
More changes do use glib memory allocation
Diffstat (limited to 'hcid/dbus-hci.c')
-rw-r--r--hcid/dbus-hci.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/hcid/dbus-hci.c b/hcid/dbus-hci.c
index 5db47f4f..3d53b901 100644
--- a/hcid/dbus-hci.c
+++ b/hcid/dbus-hci.c
@@ -71,7 +71,7 @@ void bonding_request_free(struct bonding_request_info *bonding)
if (bonding->io)
g_io_channel_unref(bonding->io);
- free(bonding);
+ g_free(bonding);
}
int found_device_cmp(const struct remote_dev_info *d1,
@@ -159,7 +159,7 @@ static int found_device_remove(GSList **list, bdaddr_t *bdaddr)
dev = l->data;
*list = g_slist_remove(*list, dev);
- free(dev);
+ g_free(dev);
return 0;
}
@@ -421,7 +421,7 @@ int unregister_adapter_path(const char *path)
name_listener_remove(connection,
adapter->discov_requestor,
(name_cb_t) discover_devices_req_exit, adapter);
- free(adapter->discov_requestor);
+ g_free(adapter->discov_requestor);
adapter->discov_requestor = NULL;
}
@@ -430,7 +430,7 @@ int unregister_adapter_path(const char *path)
adapter->pdiscov_requestor,
(name_cb_t) periodic_discover_req_exit,
adapter);
- free(adapter->pdiscov_requestor);
+ g_free(adapter->pdiscov_requestor);
adapter->pdiscov_requestor = NULL;
}
@@ -510,7 +510,7 @@ int hcid_dbus_register_device(uint16_t id)
if (!dbus_connection_register_object_path(connection, path,
&adapter_vtable, adapter)) {
error("D-Bus failed to register %s object", path);
- free(adapter);
+ g_free(adapter);
return -1;
}
@@ -718,7 +718,7 @@ int hcid_dbus_stop_device(uint16_t id)
name_listener_remove(connection, adapter->discov_requestor,
(name_cb_t) discover_devices_req_exit,
adapter);
- free(adapter->discov_requestor);
+ g_free(adapter->discov_requestor);
adapter->discov_requestor = NULL;
}
@@ -726,7 +726,7 @@ int hcid_dbus_stop_device(uint16_t id)
name_listener_remove(connection, adapter->pdiscov_requestor,
(name_cb_t) periodic_discover_req_exit,
adapter);
- free(adapter->pdiscov_requestor);
+ g_free(adapter->pdiscov_requestor);
adapter->pdiscov_requestor = NULL;
}
@@ -1171,7 +1171,7 @@ void hcid_dbus_inquiry_complete(bdaddr_t *local)
if (adapter->discov_requestor) {
name_listener_remove(connection, adapter->discov_requestor,
(name_cb_t) discover_devices_req_exit, adapter);
- free(adapter->discov_requestor);
+ g_free(adapter->discov_requestor);
adapter->discov_requestor = NULL;
/* If there is a pending reply for discovery cancel */
@@ -1281,7 +1281,7 @@ void hcid_dbus_periodic_inquiry_exit(bdaddr_t *local, uint8_t status)
name_listener_remove(connection, adapter->pdiscov_requestor,
(name_cb_t) periodic_discover_req_exit,
adapter);
- free(adapter->pdiscov_requestor);
+ g_free(adapter->pdiscov_requestor);
adapter->pdiscov_requestor = NULL;
}
@@ -1376,7 +1376,7 @@ void hcid_dbus_inquiry_result(bdaddr_t *local, bdaddr_t *peer, uint32_t class,
char *dev = l->data;
adapter->oor_devices = g_slist_remove(adapter->oor_devices,
dev);
- free(dev);
+ g_free(dev);
}
}
@@ -1414,7 +1414,7 @@ void hcid_dbus_inquiry_result(bdaddr_t *local, bdaddr_t *peer, uint32_t class,
name_status = NAME_NOT_REQUIRED;
if (name)
- free(name);
+ g_free(name);
name = tmp_name;
} else {
@@ -1432,7 +1432,7 @@ void hcid_dbus_inquiry_result(bdaddr_t *local, bdaddr_t *peer, uint32_t class,
DBUS_TYPE_INVALID);
send_message_and_unref(connection, signal_name);
- free(name);
+ g_free(name);
if (name_type != 0x08)
name_status = NAME_SENT;
@@ -1538,7 +1538,7 @@ void hcid_dbus_remote_name(bdaddr_t *local, bdaddr_t *peer, uint8_t status,
if (adapter->discov_requestor) {
name_listener_remove(connection, adapter->discov_requestor,
(name_cb_t) discover_devices_req_exit, adapter);
- free(adapter->discov_requestor);
+ g_free(adapter->discov_requestor);
adapter->discov_requestor = NULL;
/* If there is a pending reply for discovery cancel */