summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-09-22 12:35:42 +0200
committerThomas Haller <thaller@redhat.com>2015-09-23 16:09:43 +0200
commitfb0e87be394c0fdb4ccf2911bd089bbdf0b19113 (patch)
treec2808f582bb0124e90d198b511fce1af287dce24
parent41917a52c085b8699e5b37ef9b574ee265dcd0bf (diff)
downloadNetworkManager-fb0e87be394c0fdb4ccf2911bd089bbdf0b19113.tar.gz
systemd/adapt: use slice-allocator for struct sd_event_source
-rw-r--r--src/systemd/nm-sd-adapt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/systemd/nm-sd-adapt.c b/src/systemd/nm-sd-adapt.c
index 7984dcba59..1f6038e9c9 100644
--- a/src/systemd/nm-sd-adapt.c
+++ b/src/systemd/nm-sd-adapt.c
@@ -42,7 +42,7 @@ source_new (void)
{
struct sd_event_source *source;
- source = g_new0 (struct sd_event_source, 1);
+ source = g_slice_new0 (struct sd_event_source);
source->refcount = 1;
return source;
}
@@ -72,7 +72,7 @@ sd_event_source_unref (sd_event_source *s)
*/
g_io_channel_unref (s->channel);
}
- g_free (s);
+ g_slice_free (struct sd_event_source, s);
}
return NULL;
}