Let's make sure we keep a reference to the event source
(Note that this code is currently not used, which is why this was never
used: in all cases we do not add listener fds after the event is
attached, but before. In that case this code is not called.)
};
if (s->event) {
- _cleanup_(sd_event_source_unrefp) sd_event_source *es = NULL;
-
- r = sd_event_add_io(s->event, &es, fd, EPOLLIN, connect_callback, ss);
+ r = sd_event_add_io(s->event, &ss->event_source, fd, EPOLLIN, connect_callback, ss);
if (r < 0)
return r;