summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2016-03-29 10:48:01 +0200
committerThomas Haller <thaller@redhat.com>2016-03-29 10:50:11 +0200
commitfc5234c7b9655324920a3e3cc6584d371ef8f29b (patch)
treeaf554ac9c92490cee18c22a9fc784d06be0cef95
parentb0fa08d9355a226cdbb37049f20dd81a1990f8f7 (diff)
downloadNetworkManager-th/policy-cleanup.tar.gz
policy: use slice allocator for ActivateDatath/policy-cleanup
-rw-r--r--src/nm-policy.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nm-policy.c b/src/nm-policy.c
index 76303f2485..a46b35a269 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);