loader: Make the global/instance ext list once for each instance
Also fix some bugs in the heap_alloc/heap_free.
Also fix some memory leaks.
diff --git a/loader/loader.h b/loader/loader.h
index 15b78f5..5b66266 100644
--- a/loader/loader.h
+++ b/loader/loader.h
@@ -161,7 +161,7 @@
uint32_t total_icd_count;
struct loader_icd *icds;
struct loader_instance *next;
-
+ struct loader_extension_list ext_list;
/* TODO: Should keep track of application provided allocation functions */
struct loader_msg_callback_map_entry *icd_msg_callback_map;