diff options
author | Thomas Haller <thaller@redhat.com> | 2016-03-29 10:48:01 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2016-03-29 12:18:15 +0200 |
commit | 573f3a9f59cf2818e4123c9fff738b0c5650ba96 (patch) | |
tree | 8fc0388e69cd46145b22ea7d855d2ed0aef54c38 /src/nm-policy.c | |
parent | 03d5479320cd8a97de2bc39d7f2d27d74c83c1b0 (diff) | |
download | NetworkManager-573f3a9f59cf2818e4123c9fff738b0c5650ba96.tar.gz |
policy: use slice allocator for ActivateData
Diffstat (limited to 'src/nm-policy.c')
-rw-r--r-- | src/nm-policy.c | 5 |
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); |