diff options
Diffstat (limited to 'src/udev/udevd.c')
-rw-r--r-- | src/udev/udevd.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/udev/udevd.c b/src/udev/udevd.c index fd799cc910..7c6c5d6a87 100644 --- a/src/udev/udevd.c +++ b/src/udev/udevd.c @@ -314,10 +314,12 @@ static void worker_new(struct event *event) udev_device_unref(dev); dev = NULL; - udev_event_unref(udev_event); - - if (udev_event->sigterm) + if (udev_event->sigterm) { + udev_event_unref(udev_event); goto out; + } + + udev_event_unref(udev_event); /* wait for more device messages from main udevd, or term signal */ while (dev == NULL) { |