Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP1:Update
libqb
bug-947341_libqb-ipc-fd-memory-leaks.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File bug-947341_libqb-ipc-fd-memory-leaks.patch of Package libqb
commit f5fd0c950ce1bf19fd5186fd2b1f2cc67f5de3ec Author: Gao,Yan <ygao@suse.com> Date: Tue Oct 6 17:48:05 2015 +0200 Fix: ipc: Prevent fd and memory leaks in handle_new_connection() 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. diff --git a/lib/ipc_setup.c b/lib/ipc_setup.c index 28a0ddc..06257c1 100644 --- a/lib/ipc_setup.c +++ b/lib/ipc_setup.c @@ -556,7 +556,14 @@ send_response: "Error in connection setup (%s)", c->description); } - qb_ipcs_disconnect(c); + + if (c->state == QB_IPCS_CONNECTION_INACTIVE) { + /* This removes the initial alloc ref */ + qb_ipcs_connection_unref(c); + qb_ipcc_us_sock_close(sock); + } else { + qb_ipcs_disconnect(c); + } } return res; }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor