vendor/unity/extras/fixture/test/unity_fixture_Test.c in ceedling-0.20.3 vs vendor/unity/extras/fixture/test/unity_fixture_Test.c in ceedling-0.21.0

- old
+ new

@@ -522,12 +522,15 @@ void* m = malloc(UNITY_INTERNAL_HEAP_SIZE_BYTES/2); void* n1 = malloc(10); void* out_of_mem = realloc(n1, UNITY_INTERNAL_HEAP_SIZE_BYTES/2 + 1); void* n2 = malloc(10); TEST_ASSERT_NOT_NULL(m); - TEST_ASSERT_NULL(out_of_mem); + if (out_of_mem == NULL) + { + free(n1); + TEST_ASSERT_NULL(out_of_mem); + } TEST_ASSERT_NOT_EQUAL(n2, n1); free(n2); - free(n1); free(m); #endif }