projects
/
NetworkManager.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0ea3880
)
policy: use slice allocator for PendingSecondaryData
author
Thomas Haller
<thaller@redhat.com>
Tue, 29 Mar 2016 08:48:01 +0000
(10:48 +0200)
committer
Thomas Haller
<thaller@redhat.com>
Tue, 29 Mar 2016 10:18:15 +0000
(12:18 +0200)
src/nm-policy.c
patch
|
blob
|
history
diff --git
a/src/nm-policy.c
b/src/nm-policy.c
index
c7d5481
..
76303f2
100644
(file)
--- a/
src/nm-policy.c
+++ b/
src/nm-policy.c
@@
-759,7
+759,7
@@
pending_secondary_data_new (NMDevice *device, GSList *secondaries)
{
PendingSecondaryData *data;
- data = g_
malloc0 (sizeof (PendingSecondaryData)
);
+ data = g_
slice_new (PendingSecondaryData
);
data->device = g_object_ref (device);
data->secondaries = secondaries;
return data;
@@
-770,8
+770,7
@@
pending_secondary_data_free (PendingSecondaryData *data)
{
g_object_unref (data->device);
g_slist_free_full (data->secondaries, g_object_unref);
- memset (data, 0, sizeof (*data));
- g_free (data);
+ g_slice_free (PendingSecondaryData, data);
}
static void