=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/ssh-keygen.c,v retrieving revision 1.224 retrieving revision 1.226 diff -u -r1.224 -r1.226 --- src/usr.bin/ssh/ssh-keygen.c 2013/01/18 07:59:46 1.224 +++ src/usr.bin/ssh/ssh-keygen.c 2013/04/19 01:01:00 1.226 @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keygen.c,v 1.224 2013/01/18 07:59:46 jmc Exp $ */ +/* $OpenBSD: ssh-keygen.c,v 1.226 2013/04/19 01:01:00 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1994 Tatu Ylonen , Espoo, Finland @@ -2023,6 +2023,7 @@ } if (strcmp(path, "-") != 0) fclose(krl_spec); + free(path); } static void @@ -2075,6 +2076,8 @@ close(fd); buffer_free(&kbuf); ssh_krl_free(krl); + if (ca != NULL) + key_free(ca); } static void @@ -2489,7 +2492,7 @@ if (do_screen_candidates) { FILE *in; - FILE *out = fopen(out_file, "w"); + FILE *out = fopen(out_file, "a"); if (have_identity && strcmp(identity_file, "-") != 0) { if ((in = fopen(identity_file, "r")) == NULL) {