mirror of
https://github.com/pocoproject/poco.git
synced 2025-02-20 22:31:23 +01:00
fix(Environment): Possibility of memory leak in Windows Environment nodeIdImpl? #3823
This commit is contained in:
parent
1181fb2485
commit
d11e48f851
@ -216,7 +216,8 @@ void EnvironmentImpl::nodeIdImpl(NodeId& id)
|
||||
}
|
||||
else if (rc != ERROR_SUCCESS)
|
||||
{
|
||||
return;
|
||||
delete[] reinterpret_cast<char*>(pAdapterInfo);
|
||||
throw SystemException("cannot get network adapter list");
|
||||
}
|
||||
if (GetAdaptersInfo(pAdapterInfo, &len) == NO_ERROR)
|
||||
{
|
||||
|
@ -167,6 +167,7 @@ void EnvironmentImpl::nodeIdImpl(NodeId& id)
|
||||
}
|
||||
else if (rc != ERROR_SUCCESS)
|
||||
{
|
||||
delete[] reinterpret_cast<char*>(pAdapterInfo);
|
||||
throw SystemException("cannot get network adapter list");
|
||||
}
|
||||
try
|
||||
|
Loading…
x
Reference in New Issue
Block a user