mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2025-06-25 18:57:58 +08:00
Update unity_fixture.c
Sorry @mvandervoord -- not your code, your repository 😁 Regarding the double free, cppcheck has a check for that too (just saying) 👍
This commit is contained in:

committed by
GitHub

parent
0737b4117f
commit
4fd5f79f28
@ -207,7 +207,7 @@ void* unity_malloc(size_t size)
|
|||||||
mem = (char*)&(guard[1]);
|
mem = (char*)&(guard[1]);
|
||||||
memcpy(&mem[size], end, sizeof(end));
|
memcpy(&mem[size], end, sizeof(end));
|
||||||
|
|
||||||
#ifndef UNITY_EXCLUDE_STDLIB_MALLOC
|
#ifndef UNITY_FIXTURE_MALLOC_OVERRIDES_H_
|
||||||
free(guard);
|
free(guard);
|
||||||
#endif
|
#endif
|
||||||
return (void*)mem;
|
return (void*)mem;
|
||||||
|
Reference in New Issue
Block a user