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 ec75e8e07a
This commit is contained in:
committed by
Luca Boccassi
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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user