From: Yu Watanabe Date: Thu, 5 Apr 2018 05:24:59 +0000 (+0900) Subject: core/device: trivial simplification X-Git-Tag: v239~437^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0dfb0a0abd98f8726a39f26e4d737f47ec0fd53b;p=thirdparty%2Fsystemd.git core/device: trivial simplification --- diff --git a/src/core/device.c b/src/core/device.c index 66bfc30b5f2..8ba55625cd3 100644 --- a/src/core/device.c +++ b/src/core/device.c @@ -659,10 +659,8 @@ static void device_shutdown(Manager *m) { m->udev_event_source = sd_event_source_unref(m->udev_event_source); - if (m->udev_monitor) { - udev_monitor_unref(m->udev_monitor); - m->udev_monitor = NULL; - } + if (m->udev_monitor) + m->udev_monitor = udev_monitor_unref(m->udev_monitor); m->devices_by_sysfs = hashmap_free(m->devices_by_sysfs); }