forked from pool/libqb
Accepting request 337267 from home:yan_gao:branches:network:ha-clustering:Factory:Test
- ipc: Prevent fd and memory leaks in handle_new_connection() (bsc#947341) * bug-947341_libqb-ipc-fd-memory-leaks.patch - log: don't call dlopen inside dl_iterate_phdr() - ipc: Don't send the dispatch_del() function a closed fd - Upstream version cs: 1a7ea3b8d8bf9d5ffbbfdc785ace2b81e9f2356d OBS-URL: https://build.opensuse.org/request/show/337267 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/libqb?expand=0&rev=69
This commit is contained in:
parent
f09d48bc14
commit
581ca04095
2
_service
2
_service
@ -11,7 +11,7 @@
|
||||
<param name="version">0.17.2</param>
|
||||
-->
|
||||
<param name="versionformat">0.17.2+git%cd.%h</param>
|
||||
<param name="revision">4d817cc7e0b620acda8cc45266dc085c5bf48c59</param>
|
||||
<param name="revision">1a7ea3b8d8bf9d5ffbbfdc785ace2b81e9f2356d</param>
|
||||
</service>
|
||||
|
||||
<service name="recompress" mode="disabled">
|
||||
|
30
bug-947341_libqb-ipc-fd-memory-leaks.patch
Normal file
30
bug-947341_libqb-ipc-fd-memory-leaks.patch
Normal file
@ -0,0 +1,30 @@
|
||||
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;
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:55073dfcc15200ee04604a353c40713c18b9013136788ce7b7915d206cd2cab2
|
||||
size 129687
|
3
libqb-0.17.2+git20151001.1a7ea3b.tar.bz2
Normal file
3
libqb-0.17.2+git20151001.1a7ea3b.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:de88b20e4b29a0d6ceb41f0ddd9a4565c05118b2a318ff7713cd1ce59e1b990e
|
||||
size 129823
|
@ -1,3 +1,16 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 8 13:18:22 UTC 2015 - ygao@suse.com
|
||||
|
||||
- ipc: Prevent fd and memory leaks in handle_new_connection() (bsc#947341)
|
||||
* bug-947341_libqb-ipc-fd-memory-leaks.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 8 13:15:12 UTC 2015 - ygao@suse.com
|
||||
|
||||
- log: don't call dlopen inside dl_iterate_phdr()
|
||||
- ipc: Don't send the dispatch_del() function a closed fd
|
||||
- Upstream version cs: 1a7ea3b8d8bf9d5ffbbfdc785ace2b81e9f2356d
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Aug 27 16:16:14 UTC 2015 - ygao@suse.com
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
|
||||
Name: libqb
|
||||
Version: 0.17.2+git20150824.4d817cc
|
||||
Version: 0.17.2+git20151001.1a7ea3b
|
||||
Release: 0
|
||||
Summary: An IPC library for high performance servers
|
||||
License: LGPL-2.1+
|
||||
@ -26,6 +26,7 @@ Url: https://github.com/ClusterLabs/libqb
|
||||
Source0: %{name}-%{version}.tar.bz2
|
||||
Source1: baselibs.conf
|
||||
Patch1: libqb-configure-package-version.patch
|
||||
Patch2: bug-947341_libqb-ipc-fd-memory-leaks.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
BuildRequires: autoconf
|
||||
@ -68,6 +69,7 @@ tracing, ipc, and poll.
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
%build
|
||||
./autogen.sh
|
||||
|
Loading…
x
Reference in New Issue
Block a user