mirror of
https://git.proxmox.com/git/mirror_corosync
synced 2025-07-27 05:17:35 +00:00
Add missing hdb_handle_put in totemsrp and handle errors in mkdir and
chdir properly. git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1818 fd59a12c-fef9-0310-b244-a6a79926bd2f
This commit is contained in:
parent
9d1c727a82
commit
5129befb9b
@ -722,7 +722,14 @@ int totemsrp_initialize (
|
||||
}
|
||||
|
||||
res = mkdir (rundir, 0700);
|
||||
chdir (rundir);
|
||||
if (res == -1) {
|
||||
goto error_put;
|
||||
}
|
||||
|
||||
res = chdir (rundir);
|
||||
if (res == -1) {
|
||||
goto error_put;
|
||||
}
|
||||
|
||||
totemsrp_instance_initialize (instance);
|
||||
|
||||
@ -853,8 +860,13 @@ int totemsrp_initialize (
|
||||
MESSAGE_QUEUE_MAX,
|
||||
sizeof (struct message_item));
|
||||
|
||||
hdb_handle_put (&totemsrp_instance_database, *handle);
|
||||
|
||||
return (0);
|
||||
|
||||
error_put:
|
||||
hdb_handle_put (&totemsrp_instance_database, *handle);
|
||||
|
||||
error_destroy:
|
||||
hdb_handle_destroy (&totemsrp_instance_database, *handle);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user