diff --git a/uc.c b/uc.c index 4fa02bef..370f7b95 100644 --- a/uc.c +++ b/uc.c @@ -1084,6 +1084,7 @@ uc_err uc_hook_del(uc_engine *uc, uc_hook hh) if (list_remove(&uc->hook[i], (void *)hook)) { if (--hook->refs == 0) { free(hook); + break; } } }