artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
842e413
)
avoid double-free in error path introduced in r1.70;
author
djm
<djm@openbsd.org>
Mon, 1 Aug 2022 11:09:26 +0000
(11:09 +0000)
committer
djm
<djm@openbsd.org>
Mon, 1 Aug 2022 11:09:26 +0000
(11:09 +0000)
report and fix based on GHPR#332 by v-rzh
ok dtucker@
usr.bin/ssh/ssh-keysign.c
patch
|
blob
|
history
diff --git
a/usr.bin/ssh/ssh-keysign.c
b/usr.bin/ssh/ssh-keysign.c
index
ade8552
..
dc35878
100644
(file)
--- a/
usr.bin/ssh/ssh-keysign.c
+++ b/
usr.bin/ssh/ssh-keysign.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: ssh-keysign.c,v 1.7
0 2022/01/06 22:00:18
djm Exp $ */
+/* $OpenBSD: ssh-keysign.c,v 1.7
1 2022/08/01 11:09:26
djm Exp $ */
/*
* Copyright (c) 2002 Markus Friedl. All rights reserved.
*
@@
-150,9
+150,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;