From 573f3a9f59cf2818e4123c9fff738b0c5650ba96 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Tue, 29 Mar 2016 10:48:01 +0200 Subject: [PATCH] policy: use slice allocator for ActivateData --- src/nm-policy.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/nm-policy.c b/src/nm-policy.c index 76303f248..a46b35a26 100644 --- a/src/nm-policy.c +++ b/src/nm-policy.c @@ -655,7 +655,8 @@ activate_data_free (ActivateData *data) if (data->autoactivate_id) g_source_remove (data->autoactivate_id); g_object_unref (data->device); - g_free (data); + + g_slice_free (ActivateData, data); } static gboolean @@ -950,7 +951,7 @@ schedule_activate_check (NMPolicy *self, NMDevice *device) nm_device_add_pending_action (device, "autoactivate", TRUE); - data = g_malloc0 (sizeof (ActivateData)); + data = g_slice_new0 (ActivateData); data->policy = self; data->device = g_object_ref (device); data->autoactivate_id = g_idle_add (auto_activate_device, data); -- 2.17.1