X-Git-Url: http://andersk.mit.edu/gitweb/openssh.git/blobdiff_plain/b9ed513a9d3ba81671bc673bf88803f37911ca4a..a4c0faa29945935489f44e26272c0069e54c516c:/authfile.c diff --git a/authfile.c b/authfile.c index 1f46093e..83ddd635 100644 --- a/authfile.c +++ b/authfile.c @@ -36,7 +36,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: authfile.c,v 1.54 2003/05/24 09:30:39 djm Exp $"); +RCSID("$OpenBSD: authfile.c,v 1.55 2003/09/18 07:56:05 markus Exp $"); #include #include @@ -143,6 +143,7 @@ key_save_private_rsa1(Key *key, const char *filename, const char *passphrase, fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0600); if (fd < 0) { error("open %s failed: %s.", filename, strerror(errno)); + buffer_free(&encrypted); return 0; } if (write(fd, buffer_ptr(&encrypted), buffer_len(&encrypted)) !=