aboutsummaryrefslogtreecommitdiff
path: root/loader/cJSON.h
diff options
context:
space:
mode:
authorMark Young <marky@lunarg.com>2016-06-03 15:11:02 -0600
committerMark Young <marky@lunarg.com>2016-06-29 16:48:31 -0600
commit8acd594c445c59c48932159eaf10dd138ba96994 (patch)
tree55672d16d7fb7e16715f18eec370e0c5d54af192 /loader/cJSON.h
parent347577f7c05e98225b3b6a363a7c5a5cb7820ef8 (diff)
downloadusermoji-8acd594c445c59c48932159eaf10dd138ba96994.tar.xz
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
Diffstat (limited to 'loader/cJSON.h')
-rw-r--r--loader/cJSON.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/loader/cJSON.h b/loader/cJSON.h
index c6a57be5..cab30515 100644
--- a/loader/cJSON.h
+++ b/loader/cJSON.h
@@ -84,6 +84,8 @@ extern char *cJSON_PrintUnformatted(cJSON *item);
extern char *cJSON_PrintBuffered(cJSON *item, int prebuffer, int fmt);
/* Delete a cJSON entity and all subentities. */
extern void cJSON_Delete(cJSON *c);
+/* Delete an item allocated inside the JSON parser*/
+extern void cJSON_Free(void *p);
/* Returns the number of items in an array (or object). */
extern int cJSON_GetArraySize(cJSON *array);