summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2015-11-09 22:48:25 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2015-11-09 22:48:25 +0100
commit89dbb39566d08c17e50754a1b9547bbfa2f8c6ca (patch)
tree21303fb6afbb463589dfa4163754c1d8be7189b5
parent17cc53a73e22208ab90b66531abf596a7998d84e (diff)
downloadgnutls-89dbb39566d08c17e50754a1b9547bbfa2f8c6ca.tar.gz
certtool: eliminate memory leaks in certificate generation
-rw-r--r--src/certtool.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/certtool.c b/src/certtool.c
index 4098bd3b02..502b3696ab 100644
--- a/src/certtool.c
+++ b/src/certtool.c
@@ -400,6 +400,7 @@ generate_certificate(gnutls_privkey_t * ret_key,
gnutls_strerror(result));
exit(1);
}
+ gnutls_pubkey_deinit(pubkey);
} else {
result = gnutls_x509_crt_set_crq(crt, crq);
if (result < 0) {
@@ -960,6 +961,7 @@ static void generate_signed_certificate(common_info_st * cinfo)
fwrite(lbuffer, 1, size, outfile);
gnutls_x509_crt_deinit(crt);
+ gnutls_x509_crt_deinit(ca_crt);
gnutls_privkey_deinit(key);
gnutls_privkey_deinit(ca_key);
}