Skip to content

Commit

Permalink
upstream: fix use-after-free in do_download_sk; ok djm
Browse files Browse the repository at this point in the history
OpenBSD-Commit-ID: 96b49623d297797d4fc069f1f09e13c8811f8863
  • Loading branch information
mfriedl authored and djmdjm committed Mar 13, 2020
1 parent 5732d58 commit e32ef97
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ssh-keygen.c
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
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit e32ef97

Please sign in to comment.