free cleanup almost the finale
Add OPENSSL_clear_free which merges cleanse and free. (Names was picked to be similar to BN_clear_free, etc.) Removed OPENSSL_freeFunc macro. Fixed the small simple ones that are left: CRYPTO_free CRYPTO_free_locked OPENSSL_free_locked Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
@@ -465,11 +465,8 @@ void ssl_cert_free(CERT *c)
|
||||
custom_exts_free(&c->cli_ext);
|
||||
custom_exts_free(&c->srv_ext);
|
||||
#endif
|
||||
if (c->pms) {
|
||||
OPENSSL_cleanse(c->pms, c->pmslen);
|
||||
OPENSSL_free(c->pms);
|
||||
c->pms = NULL;
|
||||
}
|
||||
OPENSSL_clear_free(c->pms, c->pmslen);
|
||||
c->pms = NULL;
|
||||
OPENSSL_free(c);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user