mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-27 01:10:08 +01:00
systemd/adapt: use slice-allocator for struct sd_event_source
(cherry picked from commit fb0e87be39)
This commit is contained in:
parent
436ed50f4a
commit
8c08014f47
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue