chiark / gitweb /
[PATCH] proper cleanup on udevdb_init() failure
authormbuesch@freenet.de <mbuesch@freenet.de>
Thu, 25 Dec 2003 06:58:16 +0000 (22:58 -0800)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 04:13:11 +0000 (21:13 -0700)
Seems like we need the following patch to do
proper sysbus cleanup, if udevdb_init() fails.

udev.c

diff --git a/udev.c b/udev.c
index ac29ec6..71c5f1f 100644 (file)
--- a/udev.c
+++ b/udev.c
@@ -119,7 +119,7 @@ int main(int argc, char **argv, char **envp)
        retval = udevdb_init(UDEVDB_DEFAULT);
        if (retval != 0) {
                dbg("unable to initialize database");
-               goto exit;
+               goto exit_sysbus;
        }
 
        /* initialize the naming deamon */
@@ -137,6 +137,7 @@ int main(int argc, char **argv, char **envp)
        }
        udevdb_exit();
 
+exit_sysbus:
        /* disconnect from the system message bus */
        sysbus_disconnect();