mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-30 08:19:09 +00:00
ssh-keysign: fix double free in error path
From OpenSSH-portable commit 141535b904b6, OpenBSD commit 3d21aa127b1f. MFC after: 3 days
This commit is contained in:
parent
666605ad2d
commit
963c7b084b
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: ssh-keysign.c,v 1.70 2022/01/06 22:00:18 djm Exp $ */
|
||||
/* $OpenBSD: ssh-keysign.c,v 1.71 2022/08/01 11:09:26 djm Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2002 Markus Friedl. All rights reserved.
|
||||
*
|
||||
@ -155,9 +155,7 @@ valid_request(struct passwd *pw, char *host, struct sshkey **ret, char **pkalgp,
|
||||
|
||||
debug3_f("fail %d", fail);
|
||||
|
||||
if (fail)
|
||||
sshkey_free(key);
|
||||
else {
|
||||
if (!fail) {
|
||||
if (ret != NULL) {
|
||||
*ret = key;
|
||||
key = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user