diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2005-07-01 13:19:48 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2005-07-01 13:19:48 +0000 |
commit | 363568c22a631871fa05861e45eede19bccf48d5 (patch) | |
tree | 46e091b31f35bb970991cd1262bc50c126f1bf0e /usr.bin/ssh | |
parent | 4211221f8328e7f25b98fdcbd7f2efa1d80a08b7 (diff) |
don't free() if getaddrinfo() fails; report mpech@
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r-- | usr.bin/ssh/channels.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/usr.bin/ssh/channels.c b/usr.bin/ssh/channels.c index 691f1469386..75b134c7891 100644 --- a/usr.bin/ssh/channels.c +++ b/usr.bin/ssh/channels.c @@ -39,7 +39,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: channels.c,v 1.217 2005/06/17 02:44:32 djm Exp $"); +RCSID("$OpenBSD: channels.c,v 1.218 2005/07/01 13:19:47 markus Exp $"); #include "ssh.h" #include "ssh1.h" @@ -2190,11 +2190,11 @@ channel_setup_fwd_listener(int type, const char *listen_addr, u_short listen_por if (host == NULL) { error("No forward host name."); - return success; + return 0; } if (strlen(host) > SSH_CHANNEL_PATH_LEN - 1) { error("Forward host name too long."); - return success; + return 0; } /* @@ -2245,12 +2245,10 @@ channel_setup_fwd_listener(int type, const char *listen_addr, u_short listen_por packet_disconnect("getaddrinfo: fatal error: %s", gai_strerror(r)); } else { - verbose("channel_setup_fwd_listener: " - "getaddrinfo(%.64s): %s", addr, gai_strerror(r)); - packet_send_debug("channel_setup_fwd_listener: " + error("channel_setup_fwd_listener: " "getaddrinfo(%.64s): %s", addr, gai_strerror(r)); } - aitop = NULL; + return 0; } for (ai = aitop; ai; ai = ai->ai_next) { |