1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-28 07:21:32 +03:00

bus_open leak sd_event_source when udevadm trigger。

On my host, when executing the udevadm trigger, I only receive the change event, which causes memleak
This commit is contained in:
ven 2019-05-22 14:24:28 +08:00 committed by Zbigniew Jędrzejewski-Szmek
parent 1f7b6872db
commit b2774a3ae6

View File

@ -341,7 +341,8 @@ int button_open(Button *b) {
}
(void) button_set_mask(b);
b->io_event_source = sd_event_source_unref(b->io_event_source);
r = sd_event_add_io(b->manager->event, &b->io_event_source, b->fd, EPOLLIN, button_dispatch, b);
if (r < 0) {
log_error_errno(r, "Failed to add button event: %m");