Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: ipc: Prevent fd and memory leaks in handle_new_connection() #167

Merged
merged 1 commit into from
Jan 8, 2016

Conversation

gao-yan
Copy link
Member

@gao-yan gao-yan commented Oct 6, 2015

In handle_new_connection(), connection_accept() could fail, which would
leave the state of the connection inactive. Previously, in this case,
the socket and the allocated qb_ipcs_connection would be leaked.

It can be produced with the following steps:

  1. Run pacemaker_remoted without being connected by corosync nodes.
  2. Run crm_mon on the same node.
  3. The pacemaker_remoted ends up hitting the per-process fd limit.

In handle_new_connection(), connection_accept() could fail, which would
leave the state of the connection inactive. Previously, in this case,
the socket and the allocated qb_ipcs_connection would be leaked.
chrissie-c added a commit that referenced this pull request Jan 8, 2016
Fix: ipc: Prevent fd and memory leaks in handle_new_connection()
@chrissie-c chrissie-c merged commit 3245d7a into ClusterLabs:master Jan 8, 2016
@chrissie-c
Copy link
Contributor

I can't reproduce the problem but the patch looks sane and passes other tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants