[oe-commits] [meta-openembedded] 01/02: openhpi: close socket in saHpiSessionClose

git at git.openembedded.org git at git.openembedded.org
Fri Jul 13 05:49:37 UTC 2018


This is an automated email from the git hooks/post-receive script.

khem pushed a commit to branch master
in repository meta-openembedded.

commit 41c23d32ca8bbaf27cf86905928baa5be07fff0f
Author: Ovidiu Panait <ovidiu.panait at windriver.com>
AuthorDate: Thu Jul 12 15:38:50 2018 +0800

    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 at windriver.com>
    Signed-off-by: Ovidiu Panait <ovidiu.panait at windriver.com>
    Signed-off-by: Yi Zhao <yi.zhao at windriver.com>
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
 .../openhpi/files/0001-session-close-socket.patch  | 37 ++++++++++++++++++++++
 .../recipes-daemons/openhpi/openhpi_3.6.1.bb       |  1 +
 2 files changed, 38 insertions(+)

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 0000000..2cefd55
--- /dev/null
+++ b/meta-networking/recipes-daemons/openhpi/files/0001-session-close-socket.patch
@@ -0,0 +1,37 @@
+From b8bc6bfdb5e7fb5b46d3a830e04632939bee6b98 Mon Sep 17 00:00:00 2001
+From: Catalin Enache <catalin.enache at windriver.com>
+Date: Fri, 9 Feb 2018 16:35:11 +0200
+Subject: [PATCH] saHpiSessionClose: close socket
+
+saHpiSessionClose leaks file descriptors
+
+Upstream issue: https://github.com/open-hpi/openhpi/issues/1918
+
+Upstream-Status: Pending
+
+Signed-off-by: Catalin Enache <catalin.enache at windriver.com>
+Signed-off-by: Yi Zhao <yi.zhao at windriver.com>
+---
+ baselib/session.cpp | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/baselib/session.cpp b/baselib/session.cpp
+index c5edfc8..4ece1b7 100644
+--- a/baselib/session.cpp
++++ b/baselib/session.cpp
+@@ -126,6 +126,12 @@ cSession::cSession()
+ 
+ cSession::~cSession()
+ {
++	cClientStreamSock * sock;
++	gpointer ptr = wrap_g_static_private_get( &m_sockets );
++	if ( ptr ) {
++	    sock = reinterpret_cast<cClientStreamSock *>(ptr);
++	    sock->Close();
++	}
+     wrap_g_static_private_free( &m_sockets );
+ }
+ 
+-- 
+2.10.2
+
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 ecf71d7..596578e 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 \
            file://fix-narrowing-warning.patch \
            file://0001-plugins-Check-for-PTHREAD_RECURSIVE_MUTEX_INITIALIZE.patch \
            file://0001-ipmidirect-Replace-__STRING.patch \
+           file://0001-session-close-socket.patch \
            "
 
 SRC_URI[md5sum] = "4718b16e0f749b5ad214a9b04f45dd23"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list