mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2026-01-27 10:14:28 +01:00
unity_fixture: Make unity_free() NULL-safe
At the start of unity_free(), check mem for NULL, and return immediately if it is, so we don't crash in this case. This mimics the behaviour of most free() implementations. Closes #135. Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
This commit is contained in:
@@ -18,6 +18,7 @@ TEST_GROUP_RUNNER(UnityFixture)
|
||||
RUN_TEST_CASE(UnityFixture, ReallocSizeZeroFreesMemAndReturnsNullPointer);
|
||||
RUN_TEST_CASE(UnityFixture, CallocFillsWithZero);
|
||||
RUN_TEST_CASE(UnityFixture, PointerSet);
|
||||
RUN_TEST_CASE(UnityFixture, FreeNULLSafety);
|
||||
}
|
||||
|
||||
TEST_GROUP_RUNNER(UnityCommandOptions)
|
||||
|
||||
Reference in New Issue
Block a user