mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-28 16:17:28 -04:00
Fixed some memory leaks when config could not be loaded/saved.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5294 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
fc8dfcf65b
commit
7e226558e4
3 changed files with 25 additions and 5 deletions
|
@ -237,13 +237,18 @@ int BinEncryptedFileInterface::readdata(void* data, int len)
|
|||
|
||||
|
||||
if(-1 == BinFileInterface::readdata(encryptedData, encrypDataLen))
|
||||
{
|
||||
delete[] encryptedData;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if((encrypDataLen > 0) && (encryptedData != NULL))
|
||||
{
|
||||
|
||||
if(!AuthSSL::getAuthSSL()->decrypt((void*&)(this->data), sizeData, encryptedData, encrypDataLen))
|
||||
{
|
||||
delete[] encryptedData;
|
||||
return -1;
|
||||
}
|
||||
|
||||
haveData = true;
|
||||
delete[] encryptedData;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue