aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/security
diff options
context:
space:
mode:
authorGravatar CodaFi <devteam.codafi@gmail.com>2014-03-06 22:38:45 -0700
committerGravatar CodaFi <devteam.codafi@gmail.com>2014-03-06 22:38:45 -0700
commit32d6e4440340b299169e766971a4e95631e35c91 (patch)
tree01ab171186eaa35c1c71bf7a31f1cf39cd0b82c5 /src/core/security
parentbc37ad3040c04529fe882eb3db967e7afdd4111a (diff)
Check for NULL certs
Diffstat (limited to 'src/core/security')
-rw-r--r--src/core/security/MCCertificateUtils.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/security/MCCertificateUtils.cc b/src/core/security/MCCertificateUtils.cc
index de7f649d..e6e46cbf 100644
--- a/src/core/security/MCCertificateUtils.cc
+++ b/src/core/security/MCCertificateUtils.cc
@@ -138,7 +138,9 @@ err:
free_certs:
mailstream_certificate_chain_free(cCerts);
- sk_X509_pop_free((STACK_OF(X509) *) certificates, X509_free);
+ if (certificates != NULL) {
+ sk_X509_pop_free((STACK_OF(X509) *) certificates, X509_free);
+ }
if (storectx != NULL) {
X509_STORE_CTX_free(storectx);
}