forked from openssh/openssh-portable
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
upstream: fix use-after-free in do_download_sk; ok djm
OpenBSD-Commit-ID: 96b49623d297797d4fc069f1f09e13c8811f8863
- Loading branch information
Showing
1 changed file
with
2 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* $OpenBSD: ssh-keygen.c,v 1.401 2020/03/06 18:15:04 markus Exp $ */ | ||
/* $OpenBSD: ssh-keygen.c,v 1.402 2020/03/06 18:29:14 markus Exp $ */ | ||
/* | ||
* Author: Tatu Ylonen <[email protected]> | ||
* Copyright (c) 1994 Tatu Ylonen <[email protected]>, Espoo, Finland | ||
|
@@ -3025,9 +3025,9 @@ do_download_sk(const char *skprovider, const char *device) | |
free(path); | ||
if ((r = sshkey_save_public(keys[i], pubpath, | ||
keys[i]->sk_application)) != 0) { | ||
free(pubpath); | ||
error("Saving public key \"%s\" failed: %s", | ||
pubpath, ssh_err(r)); | ||
free(pubpath); | ||
break; | ||
} | ||
free(pubpath); | ||
|