mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2026-01-23 00:15:58 +01:00
Update unity_fixture.c
Free guard if UNITY_EXCLUDE_STDLIB_MALLOC is not defined. 👍
Thanks @ for the hint.
This commit is contained in:
committed by
GitHub
parent
b1d8388ab8
commit
0737b4117f
@@ -207,7 +207,9 @@ void* unity_malloc(size_t size)
|
||||
mem = (char*)&(guard[1]);
|
||||
memcpy(&mem[size], end, sizeof(end));
|
||||
|
||||
#ifndef UNITY_EXCLUDE_STDLIB_MALLOC
|
||||
free(guard);
|
||||
#endif
|
||||
return (void*)mem;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user