diff options
-rw-r--r-- | channel.h | 2 | ||||
-rw-r--r-- | common-session.c | 1 | ||||
-rw-r--r-- | dbutil.c | 9 |
3 files changed, 10 insertions, 2 deletions
@@ -96,7 +96,7 @@ struct ChanType { }; -void chaninitialise(); +void chaninitialise(const struct ChanType *chantypes[]); void chancleanup(); void setchannelfds(fd_set *readfd, fd_set *writefd); void channelio(fd_set *readfd, fd_set *writefd); diff --git a/common-session.c b/common-session.c index a8cab87..e8dc650 100644 --- a/common-session.c +++ b/common-session.c @@ -62,7 +62,6 @@ void common_session_init(int sock, char* remotehost) { ses.connecttimeout = 0; kexfirstinitialise(); /* initialise the kex state */ - chaninitialise(); /* initialise the channel state */ ses.writepayload = buf_new(MAX_TRANS_PAYLOAD_LEN); ses.transseq = 0; @@ -190,6 +190,10 @@ int dropbear_listen(const char* address, const char* port, *errstring = (char*)m_malloc(len); snprintf(*errstring, len, "Error resolving: %s", gai_strerror(err)); } + if (res0) { + freeaddrinfo(res0); + res0 = NULL; + } TRACE(("leave dropbear_listen: failed resolving")) return -1; } @@ -241,6 +245,11 @@ int dropbear_listen(const char* address, const char* port, nsock++; } + if (res0) { + freeaddrinfo(res0); + res0 = NULL; + } + if (nsock == 0) { if (errstring != NULL && *errstring == NULL) { int len; |