return 0;
}
-static int init_exec_hooks_core (struct guest_info * core, void * priv_data) {
+static int init_exec_hooks_core (struct guest_info * core, void * priv_data, void ** core_data) {
struct v3_exec_hooks * hooks = &exec_hooks;
INIT_LIST_HEAD(&(hooks->hook_list));
hooks->bin_table = v3_create_htable(0, exec_hash_fn, exec_eq_fn);
return 0;
}
-static int deinit_exec_hooks_core (struct guest_info * core, void * priv_data) {
+static int deinit_exec_hooks_core (struct guest_info * core, void * priv_data, void * core_data) {
struct v3_exec_hooks * hooks = &exec_hooks;
struct exec_hook * hook = NULL;
struct exec_hook * tmp = NULL;
struct exec_hook * hook = V3_Malloc(sizeof(struct exec_hook));
struct v3_exec_hooks * hooks = &exec_hooks;
addr_t key;
+
+ if (!hook) {
+ PrintError("Cannot allocate in hooking exec\n");
+ return -1;
+ }
memset(hook, 0, sizeof(struct exec_hook));