mirror of
https://github.com/LibreOffice/online.git
synced 2025-08-15 21:13:02 +00:00
wsd: free leaking memory
With help from Valgrind to find and verify these leaks. Change-Id: I3afeed89dc4bcd714a222f81822144477a346fb0 Reviewed-on: https://gerrit.libreoffice.org/39464 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
This commit is contained in:

committed by
Ashod Nakashian

parent
98dd83338c
commit
4f8ebca0cb
@ -615,6 +615,10 @@ private:
|
||||
|
||||
// Invoke the virtual implementation.
|
||||
pollingThread();
|
||||
|
||||
// Release sockets.
|
||||
_pollSockets.clear();
|
||||
_newSockets.clear();
|
||||
}
|
||||
catch (const std::exception& exc)
|
||||
{
|
||||
|
@ -123,6 +123,7 @@ SslContext::SslContext(const std::string& certFilePath,
|
||||
|
||||
SslContext::~SslContext()
|
||||
{
|
||||
SSL_CTX_free(_ctx);
|
||||
EVP_cleanup();
|
||||
ERR_free_strings();
|
||||
CRYPTO_set_locking_callback(0);
|
||||
|
@ -31,6 +31,9 @@ public:
|
||||
/// Read all files that we can serve into memory and compress them.
|
||||
static void initialize();
|
||||
|
||||
/// Clean cached files.
|
||||
static void uninitialize() { FileHash.clear(); }
|
||||
|
||||
static void readDirToHash(const std::string &basePath, const std::string &path);
|
||||
|
||||
static const std::string *getCompressedFile(const std::string &path);
|
||||
|
@ -2672,6 +2672,8 @@ int LOOLWSD::innerMain()
|
||||
|
||||
void LOOLWSD::cleanup()
|
||||
{
|
||||
FileServerRequestHandler::uninitialize();
|
||||
|
||||
// Finally, we no longer need SSL.
|
||||
if (LOOLWSD::isSSLEnabled())
|
||||
{
|
||||
|
Reference in New Issue
Block a user