diff cli-kex.c @ 79:5a55bd66707f

- don't crash when trying to add to known_hosts if it doesn't exist - comments
author Matt Johnston <matt@ucc.asn.au>
date Mon, 16 Aug 2004 08:59:11 +0000
parents e3adf4cf5465
children 07bcdccb3577
line wrap: on
line diff
--- a/cli-kex.c	Sun Aug 15 10:42:23 2004 +0000
+++ b/cli-kex.c	Mon Aug 16 08:59:11 2004 +0000
@@ -255,5 +255,7 @@
 		fclose(hostsfile);
 	}
 	m_free(filename);
-	buf_free(line);
+	if (line != NULL) {
+		buf_free(line);
+	}
 }