diff options
author | Trevor <unsafe@trevp.net> | 2013-06-24 15:59:05 -0700 |
---|---|---|
committer | Ben Laurie <ben@links.org> | 2013-06-28 16:01:12 +0100 |
commit | 5382adbf2c8ad6ab68ac13ea00298853bf5a0e68 (patch) | |
tree | daf9b8caaa1e857e71dcba484d9c0234c1b6c69a /ssl/ssl_cert.c | |
parent | ac9ce2cf03fda35c49879b1ed7ba051ca0d8a908 (diff) |
Cosmetic touchups.
Diffstat (limited to 'ssl/ssl_cert.c')
-rw-r--r-- | ssl/ssl_cert.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ssl/ssl_cert.c b/ssl/ssl_cert.c index f86511d81c..81b5811fd7 100644 --- a/ssl/ssl_cert.c +++ b/ssl/ssl_cert.c @@ -350,15 +350,15 @@ CERT *ssl_cert_dup(CERT *cert) if (cert->pkeys[i].serverinfo != NULL) { /* Just copy everything. */ - ret->pkeys[i].serverinfo_length = - cert->pkeys[i].serverinfo_length; ret->pkeys[i].serverinfo = - OPENSSL_malloc(ret->pkeys[i].serverinfo_length); + OPENSSL_malloc(cert->pkeys[i].serverinfo_length); if (ret->pkeys[i].serverinfo == NULL) { SSLerr(SSL_F_SSL_CERT_DUP, ERR_R_MALLOC_FAILURE); return NULL; } + ret->pkeys[i].serverinfo_length = + cert->pkeys[i].serverinfo_length; memcpy(ret->pkeys[i].serverinfo, cert->pkeys[i].serverinfo, cert->pkeys[i].serverinfo_length); @@ -488,6 +488,7 @@ void ssl_cert_clear_certs(CERT *c) { OPENSSL_free(cpk->serverinfo); cpk->serverinfo = NULL; + cpk->serverinfo_length = 0; } #endif /* Clear all flags apart from explicit sign */ |