From 5d969cffaf185c2bbaf0c489d60c910f7a53e0ce Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Mon, 29 Apr 2013 16:36:50 +0200 Subject: [PATCH] base-linux: Fix condition in ~Reply_channel Issue #717 --- base-linux/src/base/ipc/ipc.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/base-linux/src/base/ipc/ipc.cc b/base-linux/src/base/ipc/ipc.cc index f967db7cb..a56a3c42e 100644 --- a/base-linux/src/base/ipc/ipc.cc +++ b/base-linux/src/base/ipc/ipc.cc @@ -333,9 +333,8 @@ static inline void lx_call(int dst_sd, ~Reply_channel() { - for (unsigned i = 0; i < 2; i++) - if (sd[0] != -1) - lx_close(sd[i]); + if (sd[LOCAL_SOCKET] != -1) lx_close(sd[LOCAL_SOCKET]); + if (sd[REMOTE_SOCKET] != -1) lx_close(sd[REMOTE_SOCKET]); } int local_socket() const { return sd[LOCAL_SOCKET]; }