X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Flibudev%2Flibudev-monitor.c;h=56a6c5e39a6c1cdfed19a37c7e33fadec3859de9;hb=5f404b1e680cdac9f8149e73296d1d89044af773;hp=24efdc65e2908c6cb83f476e4be7ba7a914a70cf;hpb=994e023433e020e2b3f683d5d1f2c974db580447;p=elogind.git diff --git a/src/libudev/libudev-monitor.c b/src/libudev/libudev-monitor.c index 24efdc65e..56a6c5e39 100644 --- a/src/libudev/libudev-monitor.c +++ b/src/libudev/libudev-monitor.c @@ -408,7 +408,7 @@ _public_ struct udev_monitor *udev_monitor_ref(struct udev_monitor *udev_monitor * the bound socket will be closed, and the resources of the monitor * will be released. * - * Returns: the passed udev monitor if it has still an active reference, or #NULL otherwise. + * Returns: #NULL **/ _public_ struct udev_monitor *udev_monitor_unref(struct udev_monitor *udev_monitor) { @@ -416,7 +416,7 @@ _public_ struct udev_monitor *udev_monitor_unref(struct udev_monitor *udev_monit return NULL; udev_monitor->refcount--; if (udev_monitor->refcount > 0) - return udev_monitor; + return NULL; if (udev_monitor->sock >= 0) close(udev_monitor->sock); udev_list_cleanup(&udev_monitor->filter_subsystem_list);