about summary refs log tree commit diff
path: root/Src/Modules
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2002-05-16 14:05:27 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2002-05-16 14:05:27 +0000
commitdbe104ca8caa087e889ee83126f99c63110b9482 (patch)
tree0ad96b6e64e194f0b804748faf4a4f8e654be7d6 /Src/Modules
parentbbefa484f47ba659afa78b6a3c8621a17ed29e03 (diff)
downloadzsh-dbe104ca8caa087e889ee83126f99c63110b9482.tar.gz
zsh-dbe104ca8caa087e889ee83126f99c63110b9482.tar.xz
zsh-dbe104ca8caa087e889ee83126f99c63110b9482.zip
17171: Src/Modules/tcp.c: ztcp didn't return failure
when a connect() failed.
Diffstat (limited to 'Src/Modules')
-rw-r--r--Src/Modules/tcp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Src/Modules/tcp.c b/Src/Modules/tcp.c
index 78ce386db..33b7a613a 100644
--- a/Src/Modules/tcp.c
+++ b/Src/Modules/tcp.c
@@ -636,6 +636,8 @@ bin_ztcp(char *nam, char **args, char *ops, int func)
 	if (err) {
 	    zwarnnam(nam, "connection failed: %e", NULL, errno);
 	    tcp_close(sess);
+	    zsfree(desthost);
+	    return 1;
 	}
 	else
 	{