1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-23 08:25:58 +01:00

Update unity_fixture_Test.c

[../Unity-master/extras/fixture/test/unity_fixture_Test.c:530]: (error) Deallocating a deallocated pointer: n1

This solution from Daniel Fischer was helpful in fixing the error because if realloc returns a pointer to a different location, the old location is freed.

Found by https://github.com/bryongloden/cppcheck
This commit is contained in:
Bryon Gloden, CISSP®
2016-07-26 14:40:00 -04:00
committed by GitHub
parent ad0c07c9ad
commit 094c05e904

View File

@@ -527,7 +527,6 @@ TEST(InternalMalloc, ReallocFailDoesNotFreeMem)
TEST_ASSERT_NULL(out_of_mem);
TEST_ASSERT_NOT_EQUAL(n2, n1);
free(n2);
free(n1);
free(m);
#endif
}