aboutsummaryrefslogtreecommitdiff
path: root/toys
diff options
context:
space:
mode:
Diffstat (limited to 'toys')
-rw-r--r--toys/net/netcat.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/toys/net/netcat.c b/toys/net/netcat.c
index 62586054..2d80a18f 100644
--- a/toys/net/netcat.c
+++ b/toys/net/netcat.c
@@ -180,6 +180,7 @@ void netcat_main(void)
close(in1);
continue;
}
+ close(sockfd);
dup2(in1, 0);
dup2(in1, 1);
if (FLAG(E)) dup2(in1, 2);