changeset 242:3311f4aa52cb

merge of da30137eaac417f50a323f9ddd29999ec21261e0 and fb45ddf51e20f0ff007eb8abc737de3c024f45cc
author Matt Johnston <matt@ucc.asn.au>
date Mon, 05 Sep 2005 15:16:52 +0000
parents c5d3ef11155f (current diff) 581f81e8c50c (diff)
children 0056419cf0f4
files common-session.c dbutil.c
diffstat 3 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/channel.h	Mon Sep 05 15:16:10 2005 +0000
+++ b/channel.h	Mon Sep 05 15:16:52 2005 +0000
@@ -96,7 +96,7 @@
 
 };
 
-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);
--- a/common-session.c	Mon Sep 05 15:16:10 2005 +0000
+++ b/common-session.c	Mon Sep 05 15:16:52 2005 +0000
@@ -62,7 +62,6 @@
 	ses.connecttimeout = 0;
 	
 	kexfirstinitialise(); /* initialise the kex state */
-	chaninitialise(); /* initialise the channel state */
 
 	ses.writepayload = buf_new(MAX_TRANS_PAYLOAD_LEN);
 	ses.transseq = 0;
--- a/dbutil.c	Mon Sep 05 15:16:10 2005 +0000
+++ b/dbutil.c	Mon Sep 05 15:16:52 2005 +0000
@@ -190,6 +190,10 @@
 			*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 @@
 		nsock++;
 	}
 
+	if (res0) {
+		freeaddrinfo(res0);
+		res0 = NULL;
+	}
+
 	if (nsock == 0) {
 		if (errstring != NULL && *errstring == NULL) {
 			int len;