systemd/adapt: use slice-allocator for struct sd_event_source

(cherry picked from commit fb0e87be39)
This commit is contained in:
Thomas Haller 2015-09-22 12:35:42 +02:00
parent 436ed50f4a
commit 8c08014f47

View file

@ -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;
}