]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: memleak on error path; ok markus@
authordjm@openbsd.org <djm@openbsd.org>
Tue, 2 Feb 2021 22:35:14 +0000 (22:35 +0000)
committerDarren Tucker <dtucker@dtucker.net>
Fri, 5 Feb 2021 02:38:57 +0000 (13:38 +1100)
OpenBSD-Commit-ID: 2091a36d6ca3980c81891a6c4bdc544e63cb13a8

ssh-agent.c

index ea1ebb3e32ae48d7ac699bcb5acce89d40843d07..9bf6b0805008422a460eb07e7cc6ab34a492a673 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-agent.c,v 1.275 2021/01/29 06:29:46 djm Exp $ */
+/* $OpenBSD: ssh-agent.c,v 1.276 2021/02/02 22:35:14 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -522,9 +522,9 @@ process_remove_identity(SocketEntry *e)
        TAILQ_REMOVE(&idtab->idlist, id, next);
        free_identity(id);
        idtab->nentries--;
-       sshkey_free(key);
        success = 1;
  done:
+       sshkey_free(key);
        send_status(e, success);
 }