The unified diff between revisions [fdd44441..] and [1d86a4f0..] is displayed below. It can also be downloaded as a raw diff.
This diff has been restricted to the following files: 'dbutil.c'
#
#
# patch "dbutil.c"
# from [9440c0ae5ca45076f63b0f295585bfaeb82dd57c]
# to [af6e2b48222871a432cf61a0d56ea71ddf82882c]
#
============================================================
--- dbutil.c 9440c0ae5ca45076f63b0f295585bfaeb82dd57c
+++ dbutil.c af6e2b48222871a432cf61a0d56ea71ddf82882c
@@ -110,6 +110,10 @@ static void generic_dropbear_exit(int ex
exit(exitcode);
}
+void fail_assert(const char* expr, const char* file, int line) {
+ dropbear_exit("failed assertion (%s:%d): `%s'", file, line, expr);
+}
+
static void generic_dropbear_log(int UNUSED(priority), const char* format,
va_list param) {
@@ -186,6 +190,10 @@ int dropbear_listen(const char* address,
*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;
}
@@ -237,6 +245,11 @@ int dropbear_listen(const char* address,
nsock++;
}
+ if (res0) {
+ freeaddrinfo(res0);
+ res0 = NULL;
+ }
+
if (nsock == 0) {
if (errstring != NULL && *errstring == NULL) {
int len;