diff options
author | 2020-12-04 02:29:56 +0000 | |
---|---|---|
committer | 2020-12-04 02:29:56 +0000 | |
commit | ee048ab9a3145fd765ba64b4032e287665659281 (patch) | |
tree | c4222ad352752271239426da5ed5accf88661f68 /usr.bin/ssh/ssh_api.c | |
parent | memleak of DH public bignum; found with libfuzzer (diff) | |
download | wireguard-openbsd-ee048ab9a3145fd765ba64b4032e287665659281.tar.xz wireguard-openbsd-ee048ab9a3145fd765ba64b4032e287665659281.zip |
make ssh_free(NULL) a no-op
Diffstat (limited to 'usr.bin/ssh/ssh_api.c')
-rw-r--r-- | usr.bin/ssh/ssh_api.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/ssh/ssh_api.c b/usr.bin/ssh/ssh_api.c index 738209a4ce1..66ce1343123 100644 --- a/usr.bin/ssh/ssh_api.c +++ b/usr.bin/ssh/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. * @@ -146,6 +146,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. |