about summary refs log tree commit diff
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
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.
-rw-r--r--ChangeLog5
-rw-r--r--Src/Modules/tcp.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 100466c0e..06293ce6e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-05-16  Peter Stephenson  <pws@csr.com>
+
+	* 17171: Src/Modules/tcp.c: ztcp didn't return status 1 when a
+	connect() failed.
+
 2002-05-15  Peter Stephenson  <pws@pwstephenson.fsnet.co.uk>
 
 	* 17166: Src/Modules/zftp.c: must check fileno of zftp control
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
 	{