mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-18 11:08:05 -04:00
Fixed memory leaks in non-gui tests
Fixed 2 memory leaks in production code and a few in testcases. As a result leak_check_at_exit ASAN option does not need to turned off for non-gui tests. Smart pointers should be used elsewhere for consistency, but the sooner this fixes are delivered, the lesser memory leaks are introduced.
This commit is contained in:
parent
b20918b60e
commit
0ff75e7a88
10 changed files with 125 additions and 167 deletions
|
@ -86,6 +86,8 @@ bool SymmetricCipherGcrypt::init()
|
|||
|
||||
gcry_error_t error;
|
||||
|
||||
if(m_ctx != nullptr)
|
||||
gcry_cipher_close(m_ctx);
|
||||
error = gcry_cipher_open(&m_ctx, m_algo, m_mode, 0);
|
||||
if (error != 0) {
|
||||
setErrorString(error);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue