summaryrefslogtreecommitdiff
path: root/ssh_api.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2020-12-04 02:29:56 +0000
committerDamien Miller <djm@mindrot.org>2020-12-04 13:43:01 +1100
commitace12dc64f8e3a2496ca48d36b53cb3c0a090755 (patch)
tree8cc8c451d7d934c66ed6df58a457e384a7198ea7 /ssh_api.c
parent3b98b6e27f8a122dbfda9966b1afeb3e371cce91 (diff)
downloadopenssh-git-ace12dc64f8e3a2496ca48d36b53cb3c0a090755.tar.gz
upstream: make ssh_free(NULL) a no-op
OpenBSD-Commit-ID: 42cb285d94789cefe6608db89c63040ab0a80fa0
Diffstat (limited to 'ssh_api.c')
-rw-r--r--ssh_api.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ssh_api.c b/ssh_api.c
index 9479eb61..f1fd2d77 100644
--- a/ssh_api.c
+++ b/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.
*
@@ -152,6 +152,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.