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

Added missing Canary checks, and altered engine_free to wipe memory

This commit is contained in:
Bryan Roe
2019-02-01 13:02:14 -08:00
parent bd16538a8e
commit e9f8626be8
3 changed files with 14 additions and 5 deletions

View File

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