[openssh-commits] [openssh] 01/01: upstream: avoid double-free in error path introduced in r1.70; report

git+noreply at mindrot.org git+noreply at mindrot.org
Mon Aug 1 21:11:42 AEST 2022


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

djm pushed a commit to branch master
in repository openssh.

commit 141535b904b6fba01724444f38193a8599201f82
Author: djm at openbsd.org <djm at openbsd.org>
Date:   Mon Aug 1 11:09:26 2022 +0000

    upstream: avoid double-free in error path introduced in r1.70; report
    
    and fix based on GHPR#332 by v-rzh ok dtucker@
    
    OpenBSD-Commit-ID: 3d21aa127b1f37cfc5bdc21461db369a663a951f
---
 ssh-keysign.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/ssh-keysign.c b/ssh-keysign.c
index c52321e2..b989f5e9 100644
--- a/ssh-keysign.c
+++ b/ssh-keysign.c
@@ -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;

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


More information about the openssh-commits mailing list