From 8acd594c445c59c48932159eaf10dd138ba96994 Mon Sep 17 00:00:00 2001 From: Mark Young Date: Fri, 3 Jun 2016 15:11:02 -0600 Subject: loader: GH370 - re-enable allocator usage Re-enable the allocator usage in the loader. Also, fix several memory leaks. The leaks were especially noticeable during the Vulkan conformance object_management.alloc_callback_fail.instance and object_management.alloc_callback_fail.device tests because the tests were designed to intentionally fail the Alloc calls. This change now fully passes the Vulkan CTS object_management.alloc_callback_fail tests when the loader uses application-provided Allocators. Change-Id: I03f2a09bc33259442e02c917a34d78f8937808d8 --- loader/cJSON.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'loader/cJSON.c') diff --git a/loader/cJSON.c b/loader/cJSON.c index fc3ba049..e7266c38 100644 --- a/loader/cJSON.c +++ b/loader/cJSON.c @@ -88,6 +88,10 @@ void cJSON_Delete(cJSON *c) { } } +void cJSON_Free(void *p) { + cJSON_free(p); +} + /* Parse the input text to generate a number, and populate the result into item. */ static const char *parse_number(cJSON *item, const char *num) { -- cgit v1.2.3