mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 11:19:10 +00:00
Fix leak in GetLinkToMyNeighborhood
pyAgeLinkStruct copies the plAgeLinkStruct, so we can create our initial ALS on the stack and avoid crazy memory logic.
This commit is contained in:
@ -183,14 +183,12 @@ 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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user