Add cJSON_Allocators new style allocator struct

This commit is contained in:
Max Bruckner
2018-03-25 23:32:03 +02:00
parent dd1ba72ce2
commit 98e0b586ca
5 changed files with 89 additions and 51 deletions
+1 -1
View File
@@ -53,7 +53,7 @@ static void assert_parse_string(const char *string, const char *expected)
TEST_ASSERT_TRUE_MESSAGE(parse_string(item, &buffer), "Couldn't parse string.");
assert_is_string(item);
TEST_ASSERT_EQUAL_STRING_MESSAGE(expected, item->valuestring, "The parsed result isn't as expected.");
global_configuration.deallocate(item->valuestring);
global_configuration.allocators.deallocate(item->valuestring, global_configuration.userdata);
item->valuestring = NULL;
}