From 0737b4117fdc74a33a24080bd1f1a28069d4eb9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bryon=20Gloden=2C=20CISSP=C2=AE?= Date: Tue, 26 Jul 2016 16:02:41 -0400 Subject: [PATCH] Update unity_fixture.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Free guard if UNITY_EXCLUDE_STDLIB_MALLOC is not defined. 👍 Thanks @ for the hint. --- extras/fixture/src/unity_fixture.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/extras/fixture/src/unity_fixture.c b/extras/fixture/src/unity_fixture.c index 8e39876..8130931 100644 --- a/extras/fixture/src/unity_fixture.c +++ b/extras/fixture/src/unity_fixture.c @@ -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; } -- GitLab