Add missing check for failure to agree a host key algorithm.
[sgt/putty] / misc.c
diff --git a/misc.c b/misc.c
index 8a9c7b1..636ca9f 100644 (file)
--- a/misc.c
+++ b/misc.c
@@ -200,6 +200,14 @@ char *dupcat(const char *s1, ...)
     return p;
 }
 
+void burnstr(char *string)             /* sfree(str), only clear it first */
+{
+    if (string) {
+        memset(string, 0, strlen(string));
+        sfree(string);
+    }
+}
+
 /*
  * Do an sprintf(), but into a custom-allocated buffer.
  *