X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;ds=sidebyside;f=src%2Fudev%2Fudevd.c;h=6a8dda32726c735015623f6f8b486e0e0e928837;hb=baade8cc237c37bd8905d86ec6e9c7872d4abe03;hp=ab2b4ba61136d1865fb50f0b3425a282dc535615;hpb=56f64d95763a799ba4475daf44d8e9f72a1bd474;p=elogind.git diff --git a/src/udev/udevd.c b/src/udev/udevd.c index ab2b4ba61..6a8dda327 100644 --- a/src/udev/udevd.c +++ b/src/udev/udevd.c @@ -315,8 +315,9 @@ static void worker_new(struct event *event) { arg_event_timeout_usec, arg_event_timeout_warn_usec, &sigmask_orig); - /* in case rtnl was initialized */ - rtnl = sd_rtnl_ref(udev_event->rtnl); + if (udev_event->rtnl) + /* in case rtnl was initialized */ + rtnl = sd_rtnl_ref(udev_event->rtnl); /* apply/restore inotify watch */ if (udev_event->inotify_watch) {