summaryrefslogtreecommitdiff
path: root/authfile.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2003-09-22 21:01:27 +1000
committerDarren Tucker <dtucker@zip.com.au>2003-09-22 21:01:27 +1000
commitd1d41b318117258bd25f2eb2789ba3b91408bd16 (patch)
tree7cc38ef62e2417aadb71d4717dda4230c52b3866 /authfile.c
parentd2730d39a1005502b406983de84b85f6b50237de (diff)
- markus@cvs.openbsd.org 2003/09/18 07:56:05
[authfile.c] missing buffer_free(&encrypted); #662; zardoz at users.sf.net
Diffstat (limited to 'authfile.c')
-rw-r--r--authfile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/authfile.c b/authfile.c
index 1f46093e3..83ddd635f 100644
--- a/authfile.c
+++ b/authfile.c
@@ -36,7 +36,7 @@
36 */ 36 */
37 37
38#include "includes.h" 38#include "includes.h"
39RCSID("$OpenBSD: authfile.c,v 1.54 2003/05/24 09:30:39 djm Exp $"); 39RCSID("$OpenBSD: authfile.c,v 1.55 2003/09/18 07:56:05 markus Exp $");
40 40
41#include <openssl/err.h> 41#include <openssl/err.h>
42#include <openssl/evp.h> 42#include <openssl/evp.h>
@@ -143,6 +143,7 @@ key_save_private_rsa1(Key *key, const char *filename, const char *passphrase,
143 fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0600); 143 fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0600);
144 if (fd < 0) { 144 if (fd < 0) {
145 error("open %s failed: %s.", filename, strerror(errno)); 145 error("open %s failed: %s.", filename, strerror(errno));
146 buffer_free(&encrypted);
146 return 0; 147 return 0;
147 } 148 }
148 if (write(fd, buffer_ptr(&encrypted), buffer_len(&encrypted)) != 149 if (write(fd, buffer_ptr(&encrypted), buffer_len(&encrypted)) !=