1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-15 07:43:50 +00:00

Added helper method to securely scrub memory

This commit is contained in:
Bryan Roe
2020-10-16 18:48:25 -07:00
parent f5906fac77
commit d895d92e07
5 changed files with 34 additions and 5 deletions

View File

@@ -1559,7 +1559,7 @@ void ILibDuktape_ScriptContainer_Engine_free(void *udata, void *ptr)
if (ptr != NULL)
{
ILibDuktape_ScriptContainer_TotalAllocations -= ILibMemory_Size(ptr);
memset(ptr, 0xDEADBEEF, sz);
ILibMemory_SecureZero(ptr, sz);
ILibMemory_Free(ptr);
}
}