diff options
author | Ovidiu Panait <ovidiu.panait@windriver.com> | 2018-07-12 15:38:50 +0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2018-07-12 08:12:03 -0700 |
commit | 41c23d32ca8bbaf27cf86905928baa5be07fff0f (patch) | |
tree | 2e92e593e1f824cb923acea122cb260f8d847dcb /meta-networking/recipes-daemons | |
parent | df080427eb2f1ce22f752535a769383b214b5989 (diff) | |
download | meta-openembedded-41c23d32ca8bbaf27cf86905928baa5be07fff0f.tar.gz |
openhpi: close socket in saHpiSessionClose
Upstream issue: https://github.com/open-hpi/openhpi/issues/1918
The saHpiSessionClose doesn't close the socket and leaks the file
descriptor.
Signed-off-by: Catalin Enache <catalin.enache@windriver.com>
Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking/recipes-daemons')
-rw-r--r-- | meta-networking/recipes-daemons/openhpi/files/0001-session-close-socket.patch | 37 | ||||
-rw-r--r-- | meta-networking/recipes-daemons/openhpi/openhpi_3.6.1.bb | 1 |
2 files changed, 38 insertions, 0 deletions
diff --git a/meta-networking/recipes-daemons/openhpi/files/0001-session-close-socket.patch b/meta-networking/recipes-daemons/openhpi/files/0001-session-close-socket.patch new file mode 100644 index 000000000..2cefd55be --- /dev/null +++ b/meta-networking/recipes-daemons/openhpi/files/0001-session-close-socket.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | From b8bc6bfdb5e7fb5b46d3a830e04632939bee6b98 Mon Sep 17 00:00:00 2001 | ||
2 | From: Catalin Enache <catalin.enache@windriver.com> | ||
3 | Date: Fri, 9 Feb 2018 16:35:11 +0200 | ||
4 | Subject: [PATCH] saHpiSessionClose: close socket | ||
5 | |||
6 | saHpiSessionClose leaks file descriptors | ||
7 | |||
8 | Upstream issue: https://github.com/open-hpi/openhpi/issues/1918 | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | |||
12 | Signed-off-by: Catalin Enache <catalin.enache@windriver.com> | ||
13 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
14 | --- | ||
15 | baselib/session.cpp | 6 ++++++ | ||
16 | 1 file changed, 6 insertions(+) | ||
17 | |||
18 | diff --git a/baselib/session.cpp b/baselib/session.cpp | ||
19 | index c5edfc8..4ece1b7 100644 | ||
20 | --- a/baselib/session.cpp | ||
21 | +++ b/baselib/session.cpp | ||
22 | @@ -126,6 +126,12 @@ cSession::cSession() | ||
23 | |||
24 | cSession::~cSession() | ||
25 | { | ||
26 | + cClientStreamSock * sock; | ||
27 | + gpointer ptr = wrap_g_static_private_get( &m_sockets ); | ||
28 | + if ( ptr ) { | ||
29 | + sock = reinterpret_cast<cClientStreamSock *>(ptr); | ||
30 | + sock->Close(); | ||
31 | + } | ||
32 | wrap_g_static_private_free( &m_sockets ); | ||
33 | } | ||
34 | |||
35 | -- | ||
36 | 2.10.2 | ||
37 | |||
diff --git a/meta-networking/recipes-daemons/openhpi/openhpi_3.6.1.bb b/meta-networking/recipes-daemons/openhpi/openhpi_3.6.1.bb index ecf71d70f..596578e11 100644 --- a/meta-networking/recipes-daemons/openhpi/openhpi_3.6.1.bb +++ b/meta-networking/recipes-daemons/openhpi/openhpi_3.6.1.bb | |||
@@ -44,6 +44,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz \ | |||
44 | file://fix-narrowing-warning.patch \ | 44 | file://fix-narrowing-warning.patch \ |
45 | file://0001-plugins-Check-for-PTHREAD_RECURSIVE_MUTEX_INITIALIZE.patch \ | 45 | file://0001-plugins-Check-for-PTHREAD_RECURSIVE_MUTEX_INITIALIZE.patch \ |
46 | file://0001-ipmidirect-Replace-__STRING.patch \ | 46 | file://0001-ipmidirect-Replace-__STRING.patch \ |
47 | file://0001-session-close-socket.patch \ | ||
47 | " | 48 | " |
48 | 49 | ||
49 | SRC_URI[md5sum] = "4718b16e0f749b5ad214a9b04f45dd23" | 50 | SRC_URI[md5sum] = "4718b16e0f749b5ad214a9b04f45dd23" |