summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/ipc/unixsocket.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ipc/unixsocket.cpp b/test/ipc/unixsocket.cpp
index 4487d27b..9cd07ce8 100644
--- a/test/ipc/unixsocket.cpp
+++ b/test/ipc/unixsocket.cpp
@@ -146,6 +146,7 @@ private:
if (num < 0) {
cerr << "Read failed" << endl;
+ close(outfd);
stop(-EIO);
return;
} else if (!num)
@@ -153,6 +154,7 @@ private:
if (write(outfd, buf, num) < 0) {
cerr << "Write failed" << endl;
+ close(outfd);
stop(-EIO);
return;
}