[openssh-commits] [openssh] 06/07: upstream: make ssh_free(NULL) a no-op

git+noreply at mindrot.org git+noreply at mindrot.org
Fri Dec 4 13:43:59 AEDT 2020


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit ace12dc64f8e3a2496ca48d36b53cb3c0a090755
Author: djm at openbsd.org <djm at openbsd.org>
Date:   Fri Dec 4 02:29:56 2020 +0000

    upstream: make ssh_free(NULL) a no-op
    
    OpenBSD-Commit-ID: 42cb285d94789cefe6608db89c63040ab0a80fa0
---
 ssh_api.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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.

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list