summaryrefslogtreecommitdiffhomepage
path: root/cli-kex.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2004-08-16 08:59:11 +0000
committerMatt Johnston <matt@ucc.asn.au>2004-08-16 08:59:11 +0000
commitfdfc95df8b1d5c7c889e56a1028671a77f6cff5a (patch)
tree295884cbee29b91629a69ff3112b47c8de6a4337 /cli-kex.c
parent6d93048fe97aee12d79ea7921eabf426956c6a22 (diff)
- don't crash when trying to add to known_hosts if it doesn't exist
- comments --HG-- extra : convert_revision : ffafd48c7494fee17a98d901e30c3372e1a092e9
Diffstat (limited to 'cli-kex.c')
-rw-r--r--cli-kex.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/cli-kex.c b/cli-kex.c
index dc05501..bad559c 100644
--- a/cli-kex.c
+++ b/cli-kex.c
@@ -255,5 +255,7 @@ out:
fclose(hostsfile);
}
m_free(filename);
- buf_free(line);
+ if (line != NULL) {
+ buf_free(line);
+ }
}