[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:
committed by
Greg KH
parent
ee15698133
commit
df496acbee
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user