Fix possible leak in hooks

This commit is contained in:
lazymio
2022-02-12 16:28:43 +01:00
parent 9ff335efdc
commit 2a84e33f03
3 changed files with 57 additions and 34 deletions

View File

@ -3,6 +3,8 @@
#include "unicorn/platform.h"
typedef void (*delete_fn)(void *data);
struct list_item {
struct list_item *next;
void *data;
@ -10,6 +12,7 @@ struct list_item {
struct list {
struct list_item *head, *tail;
delete_fn delete_fn;
};
// create a new list