[PATCH] proper cleanup on udevdb_init() failure
Seems like we need the following patch to do proper sysbus cleanup, if udevdb_init() fails.
This commit is contained in:
parent
ee15698133
commit
df496acbee
3
udev.c
3
udev.c
|
@ -119,7 +119,7 @@ int main(int argc, char **argv, char **envp)
|
||||||
retval = udevdb_init(UDEVDB_DEFAULT);
|
retval = udevdb_init(UDEVDB_DEFAULT);
|
||||||
if (retval != 0) {
|
if (retval != 0) {
|
||||||
dbg("unable to initialize database");
|
dbg("unable to initialize database");
|
||||||
goto exit;
|
goto exit_sysbus;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* initialize the naming deamon */
|
/* initialize the naming deamon */
|
||||||
|
@ -137,6 +137,7 @@ int main(int argc, char **argv, char **envp)
|
||||||
}
|
}
|
||||||
udevdb_exit();
|
udevdb_exit();
|
||||||
|
|
||||||
|
exit_sysbus:
|
||||||
/* disconnect from the system message bus */
|
/* disconnect from the system message bus */
|
||||||
sysbus_disconnect();
|
sysbus_disconnect();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue