mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
Add free_openssl() to crypto_openssl module.
Add free_openssl() function to free the memory allocated for OpenSSL version management variables. It is required since OpenSSL management has been isolated from the crypto module. Follows #24658. Signed-off-by: Fernando Fernandez Mancera <ffernandezmancera@gmail.com>
This commit is contained in:
parent
4022277272
commit
7353c9496e
@ -3348,8 +3348,7 @@ crypto_global_cleanup(void)
|
||||
}
|
||||
#endif /* !defined(NEW_THREAD_API) */
|
||||
|
||||
tor_free(crypto_openssl_version_str);
|
||||
tor_free(crypto_openssl_header_version_str);
|
||||
free_openssl();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -113,3 +113,11 @@ setup_openssl_threading(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** free OpenSSL variables */
|
||||
void
|
||||
free_openssl(void)
|
||||
{
|
||||
tor_free(crypto_openssl_version_str);
|
||||
tor_free(crypto_openssl_header_version_str);
|
||||
}
|
||||
|
||||
|
@ -101,5 +101,8 @@ void tor_set_openssl_thread_id(CRYPTO_THREADID *threadid);
|
||||
/* OpenSSL threading setup function */
|
||||
int setup_openssl_threading(void);
|
||||
|
||||
/* Tor OpenSSL utility functions */
|
||||
void free_openssl(void);
|
||||
|
||||
#endif /* !defined(TOR_CRYPTO_OPENSSL_H) */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user