mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-04-28 02:46:13 -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
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
free(inbuf) ;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -765,10 +765,17 @@ bool AuthSSLimpl::AuthX509WithGPG(X509 *x509)
|
|||||||
std::cerr << "AuthSSLimpl::AuthX509() X509 authenticated" << std::endl;
|
std::cerr << "AuthSSLimpl::AuthX509() X509 authenticated" << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
OPENSSL_free(buf_in) ;
|
||||||
|
OPENSSL_free(buf_hashout) ;
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
err:
|
err:
|
||||||
std::cerr << "AuthSSLimpl::AuthX509() X509 NOT authenticated" << std::endl;
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -420,6 +420,8 @@ bool pqiSSLstore::encryptedSendItems(const std::list<RsItem*>& rsItemList)
|
|||||||
return false;
|
return false;
|
||||||
offset += sizeItem;
|
offset += sizeItem;
|
||||||
|
|
||||||
|
if (!(bio_flags & BIN_FLAGS_NO_DELETE))
|
||||||
|
delete *it;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(sizeItems == offset)
|
if(sizeItems == offset)
|
||||||
|
@ -944,6 +944,7 @@ bool getAvailableAccounts(std::list<accountId> &ids)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
closedir(dir) ;
|
||||||
|
|
||||||
for(it = directories.begin(); it != directories.end(); it++)
|
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 << "check_create_directory()";
|
||||||
std::cerr <<std::endl<< "\tDir Exists:" <<dir<<std::endl;
|
std::cerr <<std::endl<< "\tDir Exists:" <<dir<<std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
closedir(direc) ;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user