diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-01-26 16:39:21 +0100 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-01-26 16:39:21 +0100 |
commit | 5ae804239ee1e2f8731b73ab37e9f16d8153d477 (patch) | |
tree | fe490d9f5dafb3db48ea7440b035b0bdd6471c8d /src/modules | |
parent | 46eaac3381e072b7c08b96996d977177bbe41452 (diff) |
m_ssl_openssl Fix memory leaks on /rehash ssl, unload and in VerifyCertificate()
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/extra/m_ssl_openssl.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp index ad5eee791..9a54ff80b 100644 --- a/src/modules/extra/m_ssl_openssl.cpp +++ b/src/modules/extra/m_ssl_openssl.cpp @@ -265,6 +265,7 @@ class ModuleSSLOpenSSL : public Module ServerInstance->Logs->Log("m_ssl_openssl",DEFAULT, "m_ssl_openssl.so: Couldn't set DH parameters %s. SSL errors follow:", dhfile.c_str()); ERR_print_errors_cb(error_callback, this); } + DH_free(ret); } fclose(dhpfile); @@ -629,8 +630,11 @@ class ModuleSSLOpenSSL : public Module certinfo->trusted = false; } - certinfo->dn = X509_NAME_oneline(X509_get_subject_name(cert),0,0); - certinfo->issuer = X509_NAME_oneline(X509_get_issuer_name(cert),0,0); + char buf[512]; + X509_NAME_oneline(X509_get_subject_name(cert), buf, sizeof(buf)); + certinfo->dn = buf; + X509_NAME_oneline(X509_get_issuer_name(cert), buf, sizeof(buf)); + certinfo->issuer = buf; if (!X509_digest(cert, digest, md, &n)) { |