diff options
author | Kay Sievers <kay@vrfy.org> | 2013-08-15 19:51:08 +0200 |
---|---|---|
committer | Kay Sievers <kay@vrfy.org> | 2013-08-15 19:55:32 +0200 |
commit | 47e737dc13bf4251ae5a2249ec29b34503ed92e1 (patch) | |
tree | 041aa0dfc645089f49902a00f55c38e6d67f2bdf | |
parent | f5853dafa1b3486f3ac77fccee3cbf377baa8d95 (diff) |
udevd: simplify sigterm check
-rw-r--r-- | src/udev/udevd.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/udev/udevd.c b/src/udev/udevd.c index 7c6c5d6a87..fd799cc910 100644 --- a/src/udev/udevd.c +++ b/src/udev/udevd.c @@ -314,13 +314,11 @@ static void worker_new(struct event *event) udev_device_unref(dev); dev = NULL; - if (udev_event->sigterm) { - udev_event_unref(udev_event); - goto out; - } - udev_event_unref(udev_event); + if (udev_event->sigterm) + goto out; + /* wait for more device messages from main udevd, or term signal */ while (dev == NULL) { struct epoll_event ev[4]; |