mirror of
https://github.com/systemd/systemd.git
synced 2025-03-19 22:50:17 +03:00
sd-event: fix creation of floating event_add_time_change() event sources
We shouldn't auto-disable event sources we create in "floating" mode. Hence don#t use the disabling destructor for event sources. Given that noone else has access to this event source we just allocated anyway there's no point in explicitly disabling it before freeing it. Follow-up for ec75e8e07a0ad972e0c40e0a187e15a8d4fb3d66
This commit is contained in:
parent
94c17d67be
commit
a321e0e463
@ -124,7 +124,7 @@ int event_source_is_enabled(sd_event_source *s) {
|
||||
}
|
||||
|
||||
int event_add_time_change(sd_event *e, sd_event_source **ret, sd_event_io_handler_t callback, void *userdata) {
|
||||
_cleanup_(sd_event_source_disable_unrefp) sd_event_source *s = NULL;
|
||||
_cleanup_(sd_event_source_unrefp) sd_event_source *s = NULL;
|
||||
_cleanup_close_ int fd = -1;
|
||||
int r;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user