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

View File

@ -333,9 +333,8 @@ static inline void lx_call(int dst_sd,
~Reply_channel() ~Reply_channel()
{ {
for (unsigned i = 0; i < 2; i++) if (sd[LOCAL_SOCKET] != -1) lx_close(sd[LOCAL_SOCKET]);
if (sd[0] != -1) if (sd[REMOTE_SOCKET] != -1) lx_close(sd[REMOTE_SOCKET]);
lx_close(sd[i]);
} }
int local_socket() const { return sd[LOCAL_SOCKET]; } int local_socket() const { return sd[LOCAL_SOCKET]; }