]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: make ssh_free(NULL) a no-op
authordjm@openbsd.org <djm@openbsd.org>
Fri, 4 Dec 2020 02:29:56 +0000 (02:29 +0000)
committerDamien Miller <djm@mindrot.org>
Fri, 4 Dec 2020 02:43:01 +0000 (13:43 +1100)
OpenBSD-Commit-ID: 42cb285d94789cefe6608db89c63040ab0a80fa0

ssh_api.c

index 9479eb61b42490293048dfa5693dcfac3e584b3f..f1fd2d77ffa249bfd39daf1fb4ef5682bd13840a 100644 (file)
--- 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.