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:
thunder2 2012-07-13 22:10:52 +00:00
parent fc8dfcf65b
commit 7e226558e4
3 changed files with 25 additions and 5 deletions

View file

@ -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;