summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--channel.h2
-rw-r--r--common-session.c1
-rw-r--r--dbutil.c9
3 files changed, 10 insertions, 2 deletions
diff --git a/channel.h b/channel.h
index 40f7d15..0f0fcc1 100644
--- a/channel.h
+++ b/channel.h
@@ -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;
diff --git a/dbutil.c b/dbutil.c
index 23e46cc..b401ac6 100644
--- a/dbutil.c
+++ b/dbutil.c
@@ -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;