mirror of
https://git.proxmox.com/git/mirror_corosync
synced 2025-08-04 09:44:12 +00:00
CPG: make sure coroipcc_service_disconnect() is always called.
This prevents a shared mem leak if corosync dies while clients are connected. Calling cpg_finalize() did not release the shared mem as coroipcc_msg_send_reply_receive() returned an error and thus coroipcc_service_disconnect() did not get called. Signed-off-by: Angus Salkeld <asalkeld@redhat.com> Reviewed-by: Steven Dake <sdake@redhat.com>
This commit is contained in:
parent
a9b436c7a1
commit
e0cce2c907
11
lib/cpg.c
11
lib/cpg.c
@ -239,22 +239,13 @@ cs_error_t cpg_finalize (
|
||||
&iov,
|
||||
1,
|
||||
&res_lib_cpg_finalize,
|
||||
sizeof (struct req_lib_cpg_finalize));
|
||||
|
||||
if (error != CS_OK) {
|
||||
goto error_put;
|
||||
}
|
||||
sizeof (struct res_lib_cpg_finalize));
|
||||
|
||||
coroipcc_service_disconnect (cpg_inst->handle);
|
||||
|
||||
cpg_inst_finalize (cpg_inst, handle);
|
||||
hdb_handle_put (&cpg_handle_t_db, handle);
|
||||
|
||||
return (CPG_OK);
|
||||
|
||||
error_put:
|
||||
hdb_handle_put (&cpg_iteration_handle_t_db, handle);
|
||||
cpg_inst->finalize = 0;
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user