mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2026-01-30 03:34:27 +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:
committed by
GitHub
parent
ad0c07c9ad
commit
094c05e904
@@ -527,7 +527,6 @@ TEST(InternalMalloc, ReallocFailDoesNotFreeMem)
|
|||||||
TEST_ASSERT_NULL(out_of_mem);
|
TEST_ASSERT_NULL(out_of_mem);
|
||||||
TEST_ASSERT_NOT_EQUAL(n2, n1);
|
TEST_ASSERT_NOT_EQUAL(n2, n1);
|
||||||
free(n2);
|
free(n2);
|
||||||
free(n1);
|
|
||||||
free(m);
|
free(m);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user