sd-event: drop redundant code

The function `source_io_unregister()` will be anyway called in
`source_disconnect()`.
This commit is contained in:
Yu Watanabe
2022-07-16 00:38:37 +09:00
parent 963b6b906e
commit 76d04c3a34
+2 -5
View File
@@ -2139,12 +2139,9 @@ static sd_event_source* event_source_free(sd_event_source *s) {
* we still retain a valid event source object after
* the callback. */
if (s->dispatching) {
if (s->type == SOURCE_IO)
source_io_unregister(s);
if (s->dispatching)
source_disconnect(s);
} else
else
source_free(s);
return NULL;