From: Christian Dywan Date: Mon, 17 Jan 2011 12:02:22 +0000 (+0000) Subject: handle failure to register inotify shutdown function X-Git-Tag: dbus-1.4.4~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f67e863082a0b99c444003ec40b57ac6b8c313d;p=thirdparty%2Fdbus.git handle failure to register inotify shutdown function Origin: vendor, Maemo Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33128 Bug-NB: NB#180486 Reviewed-by: Simon McVittie --- diff --git a/bus/dir-watch-inotify.c b/bus/dir-watch-inotify.c index 39eff9746..461b8ee35 100644 --- a/bus/dir-watch-inotify.c +++ b/bus/dir-watch-inotify.c @@ -259,7 +259,13 @@ _init_inotify (BusContext *context) goto out; } - _dbus_register_shutdown_func (_shutdown_inotify, NULL); + if (!_dbus_register_shutdown_func (_shutdown_inotify, NULL)) + { + _dbus_warn ("Unable to register shutdown func"); + _dbus_watch_unref (watch); + watch = NULL; + goto out; + } } ret = 1;