From ace12dc64f8e3a2496ca48d36b53cb3c0a090755 Mon Sep 17 00:00:00 2001 From: "djm@openbsd.org" Date: Fri, 4 Dec 2020 02:29:56 +0000 Subject: [PATCH] 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 9479eb61b..f1fd2d77f 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.