summaryrefslogtreecommitdiff
path: root/src/tools/tor-gencert.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/tor-gencert.c')
-rw-r--r--src/tools/tor-gencert.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/tools/tor-gencert.c b/src/tools/tor-gencert.c
index 5f2cd3a92d..ed6c0667a1 100644
--- a/src/tools/tor-gencert.c
+++ b/src/tools/tor-gencert.c
@@ -429,12 +429,11 @@ key_to_string(EVP_PKEY *key)
}
BIO_get_mem_ptr(b, &buf);
- (void) BIO_set_close(b, BIO_NOCLOSE);
- BIO_free(b);
result = tor_malloc(buf->length + 1);
memcpy(result, buf->data, buf->length);
result[buf->length] = 0;
- BUF_MEM_free(buf);
+
+ BIO_free(b);
RSA_free(rsa);
return result;