summaryrefslogtreecommitdiff
path: root/usr.bin/ssh
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2003-09-18 07:56:06 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2003-09-18 07:56:06 +0000
commit267fd2860524ea8256b7305d48adec99957041e3 (patch)
tree48544a73e2066953dfb1a0e5dc6d03d92de3d5e8 /usr.bin/ssh
parent89976f12c3644ef6b56fe14ae1976591daa492c5 (diff)
missing buffer_free(&encrypted); #662; zardoz at users.sf.net
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r--usr.bin/ssh/authfile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/ssh/authfile.c b/usr.bin/ssh/authfile.c
index 6133ec1f67f..a7174398343 100644
--- a/usr.bin/ssh/authfile.c
+++ b/usr.bin/ssh/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 <openssl/err.h>
#include <openssl/evp.h>
@@ -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)) !=