mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-04-27 10:29:18 -04:00
Suppressed 4 memory leaks:
- authssl would call OPENSSL_malloc without OPENSSL_free - pqistore was not deleting items in pqiSSLStore when BIN_FLAGS_NO_DELETE is not here - rsdir/rsinit were calling opendir withoug closedir (which might eat FDs, in addition) - udplayer was not freeing it's 16KB buffer at end of loop. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3948 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
e576c56e27
commit
8de9d39cc0
@ -304,6 +304,8 @@ void UdpLayer::recv_loop()
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
free(inbuf) ;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -765,10 +765,17 @@ bool AuthSSLimpl::AuthX509WithGPG(X509 *x509)
|
||||
std::cerr << "AuthSSLimpl::AuthX509() X509 authenticated" << std::endl;
|
||||
#endif
|
||||
|
||||
OPENSSL_free(buf_in) ;
|
||||
OPENSSL_free(buf_hashout) ;
|
||||
return true;
|
||||
|
||||
err:
|
||||
std::cerr << "AuthSSLimpl::AuthX509() X509 NOT authenticated" << std::endl;
|
||||
|
||||
if(buf_in != NULL)
|
||||
OPENSSL_free(buf_in) ;
|
||||
if(buf_hashout != NULL)
|
||||
OPENSSL_free(buf_hashout) ;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -420,6 +420,8 @@ bool pqiSSLstore::encryptedSendItems(const std::list<RsItem*>& rsItemList)
|
||||
return false;
|
||||
offset += sizeItem;
|
||||
|
||||
if (!(bio_flags & BIN_FLAGS_NO_DELETE))
|
||||
delete *it;
|
||||
}
|
||||
|
||||
if(sizeItems == offset)
|
||||
|
@ -944,6 +944,7 @@ bool getAvailableAccounts(std::list<accountId> &ids)
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir(dir) ;
|
||||
|
||||
for(it = directories.begin(); it != directories.end(); it++)
|
||||
{
|
||||
|
@ -526,6 +526,7 @@ bool RsDirUtil::checkCreateDirectory(const std::string& dir)
|
||||
std::cerr << "check_create_directory()";
|
||||
std::cerr <<std::endl<< "\tDir Exists:" <<dir<<std::endl;
|
||||
#endif
|
||||
closedir(direc) ;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user