From 9985974998086f7fd62bc165bf667b0fc910319d Mon Sep 17 00:00:00 2001 From: liyansong2018 <1321993383@qq.com> Date: Mon, 11 Apr 2022 15:48:11 +0800 Subject: [PATCH] Fix https://github.com/unicorn-engine/unicorn/issues/1586 inner free --- uc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uc.c b/uc.c index 0634f402..5f1d2f20 100644 --- a/uc.c +++ b/uc.c @@ -388,7 +388,7 @@ uc_err uc_open(uc_arch arch, uc_mode mode, uc_engine **result) } if (uc->init_arch == NULL) { - *result = uc; + free(uc); return UC_ERR_ARCH; }