mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-22 22:03:43 +03:00
dbus-loop.c: fix variable initialization
Fix for: b92bea5d2a9481de69bb627a7b442a9f58fca43d Causing: systemd-logind[265]: Assertion 'd = event.data.ptr' failed at src/shared/dbus-loop.c:233, function bus_loop_dispatch(). Aborting.
This commit is contained in:
parent
245802dd89
commit
2f9f5aa014
@ -45,7 +45,7 @@ typedef struct EpollData {
|
||||
|
||||
static dbus_bool_t add_watch(DBusWatch *watch, void *data) {
|
||||
EpollData _cleanup_free_ *e = NULL;
|
||||
struct epoll_event ev = { .data.ptr = e };
|
||||
struct epoll_event ev = {};
|
||||
|
||||
assert(watch);
|
||||
|
||||
@ -58,6 +58,7 @@ static dbus_bool_t add_watch(DBusWatch *watch, void *data) {
|
||||
e->is_timeout = false;
|
||||
|
||||
ev.events = bus_flags_to_events(watch);
|
||||
ev.data.ptr = e;
|
||||
|
||||
if (epoll_ctl(PTR_TO_INT(data), EPOLL_CTL_ADD, e->fd, &ev) < 0) {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user