mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 11:19:10 +00:00
Merge pull request #388 from Hoikas/leaks
Fix some leaks revealed by Coverity
This commit is contained in:
@ -183,27 +183,23 @@ PyObject *pyVaultPlayerNode::GetPlayerInfo()
|
||||
|
||||
PyObject *pyVaultPlayerNode::GetLinkToMyNeighborhood()
|
||||
{
|
||||
plAgeLinkStruct * link = new plAgeLinkStruct();
|
||||
|
||||
if (VaultGetLinkToMyNeighborhood(link)) {
|
||||
PyObject * result = pyAgeLinkStruct::New(link);
|
||||
plAgeLinkStruct link;
|
||||
if (VaultGetLinkToMyNeighborhood(&link)) {
|
||||
PyObject * result = pyAgeLinkStruct::New(&link);
|
||||
return result;
|
||||
}
|
||||
|
||||
delete link;
|
||||
PYTHON_RETURN_NONE;
|
||||
}
|
||||
|
||||
PyObject *pyVaultPlayerNode::GetLinkToCity()
|
||||
{
|
||||
plAgeLinkStruct * link = new plAgeLinkStruct();
|
||||
|
||||
if (VaultGetLinkToCity(link)) {
|
||||
PyObject * result = pyAgeLinkStruct::New(link);
|
||||
plAgeLinkStruct link;
|
||||
if (VaultGetLinkToCity(&link)) {
|
||||
PyObject * result = pyAgeLinkStruct::New(&link);
|
||||
return result;
|
||||
}
|
||||
|
||||
delete link;
|
||||
PYTHON_RETURN_NONE;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user