summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/ssh_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/ssh/ssh_api.c')
-rw-r--r--usr.bin/ssh/ssh_api.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/ssh/ssh_api.c b/usr.bin/ssh/ssh_api.c
index 738209a4ce1..66ce1343123 100644
--- a/usr.bin/ssh/ssh_api.c
+++ b/usr.bin/ssh/ssh_api.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh_api.c,v 1.22 2020/10/18 11:32:02 djm Exp $ */
+/* $OpenBSD: ssh_api.c,v 1.23 2020/12/04 02:29:56 djm Exp $ */
/*
* Copyright (c) 2012 Markus Friedl. All rights reserved.
*
@@ -146,6 +146,9 @@ ssh_free(struct ssh *ssh)
{
struct key_entry *k;
+ if (ssh == NULL)
+ return;
+
/*
* we've only created the public keys variants in case we
* are a acting as a server.