[glib/th/gdbus-slice-alloc: 11/11] gdbus: use slice allocator for ExportedObject
- From: Thomas Haller <thaller src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/th/gdbus-slice-alloc: 11/11] gdbus: use slice allocator for ExportedObject
- Date: Mon, 29 Mar 2021 06:28:20 +0000 (UTC)
commit a4c17bf089c9d0fb881005839125101473f0cff6
Author: Thomas Haller <thaller redhat com>
Date: Mon Mar 29 08:26:30 2021 +0200
gdbus: use slice allocator for ExportedObject
gio/gdbusconnection.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gio/gdbusconnection.c b/gio/gdbusconnection.c
index 5aab37c22..a5a9966a1 100644
--- a/gio/gdbusconnection.c
+++ b/gio/gdbusconnection.c
@@ -4066,7 +4066,7 @@ exported_object_free (ExportedObject *eo)
{
g_free (eo->object_path);
g_hash_table_unref (eo->map_if_name_to_ei);
- g_free (eo);
+ g_slice_free (ExportedObject, eo);
}
typedef struct
@@ -5201,7 +5201,7 @@ g_dbus_connection_register_object (GDBusConnection *connection,
eo = g_hash_table_lookup (connection->map_object_path_to_eo, object_path);
if (eo == NULL)
{
- eo = g_new0 (ExportedObject, 1);
+ eo = g_slice_new (ExportedObject);
eo->object_path = g_strdup (object_path);
eo->connection = connection;
eo->map_if_name_to_ei = g_hash_table_new_full (g_str_hash,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]