From b1d8388ab85ac74f303b3384d25e805a56088a67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bryon=20Gloden=2C=20CISSP=C2=AE?= Date: Tue, 26 Jul 2016 14:19:41 -0400 Subject: [PATCH] Update unity_fixture.c [../Unity-master/extras/fixture/src/unity_fixture.c:210]: (error) Memory leak: guard Found by https://github.com/bryongloden/cppcheck --- extras/fixture/src/unity_fixture.c | 1 + 1 file changed, 1 insertion(+) diff --git a/extras/fixture/src/unity_fixture.c b/extras/fixture/src/unity_fixture.c index 7e4d1e8..8e39876 100644 --- a/extras/fixture/src/unity_fixture.c +++ b/extras/fixture/src/unity_fixture.c @@ -207,6 +207,7 @@ void* unity_malloc(size_t size) mem = (char*)&(guard[1]); memcpy(&mem[size], end, sizeof(end)); + free(guard); return (void*)mem; }