upstream: make ssh_free(NULL) a no-op

OpenBSD-Commit-ID: 42cb285d94789cefe6608db89c63040ab0a80fa0
This commit is contained in:
djm@openbsd.org 2020-12-04 02:29:56 +00:00 committed by Damien Miller
parent 3b98b6e27f
commit ace12dc64f
1 changed files with 4 additions and 1 deletions

View File

@ -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. * Copyright (c) 2012 Markus Friedl. All rights reserved.
* *
@ -152,6 +152,9 @@ ssh_free(struct ssh *ssh)
{ {
struct key_entry *k; struct key_entry *k;
if (ssh == NULL)
return;
/* /*
* we've only created the public keys variants in case we * we've only created the public keys variants in case we
* are a acting as a server. * are a acting as a server.