base-linux: Fix condition in ~Reply_channel

Issue #717
This commit is contained in:
Norman Feske 2013-04-29 16:36:50 +02:00
parent e39ff055ba
commit 5d969cffaf
1 changed files with 2 additions and 3 deletions

View File

@ -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]; }