modules: handle udev_monitor_receive_device() returning NULL

Closes #109
This commit is contained in:
Daniel Eklöf 2021-09-30 09:52:25 +02:00
parent 0f389435ca
commit 1bcf116859
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
4 changed files with 13 additions and 3 deletions

View file

@ -571,6 +571,9 @@ run(struct module *mod)
if (fds[1].revents & POLLIN) {
struct udev_device *dev = udev_monitor_receive_device(dev_mon);
if (dev == NULL)
continue;
if (handle_udev_event(mod, dev))
update = true;
udev_device_unref(dev);