Modify memory allocation failure conditions

Modify memory allocation failure conditions

Signed-off-by: zengwei zengwei1@uniontech.com
This commit is contained in:
zengwei2000 2023-12-11 01:44:39 +00:00 committed by pancake
parent 26a37aaec6
commit d0eb5e3dfc

View File

@ -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;