From d0eb5e3dfc94ba5114d1448e890e208c5c25742f Mon Sep 17 00:00:00 2001 From: zengwei2000 <102871671+zengwei2000@users.noreply.github.com> Date: Mon, 11 Dec 2023 01:44:39 +0000 Subject: [PATCH] Modify memory allocation failure conditions Modify memory allocation failure conditions Signed-off-by: zengwei zengwei1@uniontech.com --- libr/anal/anal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libr/anal/anal.c b/libr/anal/anal.c index 8d6430c32d..00f46fd6c5 100644 --- a/libr/anal/anal.c +++ b/libr/anal/anal.c @@ -710,7 +710,7 @@ R_API bool r_anal_is_prelude(RAnal *anal, ut64 addr, const ut8 *data, int len) { if (!data) { const int maxis = r_anal_archinfo (anal, R_ANAL_ARCHINFO_MAX_OP_SIZE); owned = malloc (maxis); - if (!data) { + if (!owned) { return false; } data = owned;