提交 5ce42a7e 编写于 作者: R Richard Levitte

Memory leaks fix. It now looks like all memory leaks, at least around

building complete chains, are gone.
上级 9ee1c838
...@@ -426,6 +426,7 @@ int MAIN(int argc, char **argv) ...@@ -426,6 +426,7 @@ int MAIN(int argc, char **argv)
} }
} }
if(!keyidlen) { if(!keyidlen) {
ucert = NULL;
BIO_printf(bio_err, "No certificate matches private key\n"); BIO_printf(bio_err, "No certificate matches private key\n");
goto export_end; goto export_end;
} }
...@@ -588,6 +589,7 @@ int MAIN(int argc, char **argv) ...@@ -588,6 +589,7 @@ int MAIN(int argc, char **argv)
if (certs) sk_X509_pop_free(certs, X509_free); if (certs) sk_X509_pop_free(certs, X509_free);
if (safes) sk_PKCS7_pop_free(safes, PKCS7_free); if (safes) sk_PKCS7_pop_free(safes, PKCS7_free);
if (bags) sk_PKCS12_SAFEBAG_pop_free(bags, PKCS12_SAFEBAG_free); if (bags) sk_PKCS12_SAFEBAG_pop_free(bags, PKCS12_SAFEBAG_free);
if (ucert) X509_free(ucert);
#ifdef CRYPTO_MDEBUG #ifdef CRYPTO_MDEBUG
CRYPTO_pop_info(); CRYPTO_pop_info();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册