Fix memleak in __anal_fcn_check_bp_use() (#17863)

* Fix memleak in __anal_fcn_check_bp_use()
* Fix indent
This commit is contained in:
Paul I 2020-10-29 07:50:07 +03:00 committed by GitHub
parent e9916a1914
commit 626aada98e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2003,6 +2003,7 @@ static void __anal_fcn_check_bp_use(RAnal *anal, RAnalFunction *fcn) {
&& strcmp (op.src[0]->reg->name, anal->reg->name[R_REG_NAME_SP])) {
fcn->bp_frame = false;
r_anal_op_fini (&op);
free (buf);
return;
}
break;
@ -2024,6 +2025,7 @@ static void __anal_fcn_check_bp_use(RAnal *anal, RAnalFunction *fcn) {
if (pos && pos - op.opex.ptr < 60) {
fcn->bp_frame = false;
r_anal_op_fini (&op);
free (buf);
return;
}
break;
@ -2031,8 +2033,9 @@ static void __anal_fcn_check_bp_use(RAnal *anal, RAnalFunction *fcn) {
if (op.opex.ptr && strstr (op.opex.ptr, str_to_find)) {
fcn->bp_frame = false;
r_anal_op_fini (&op);
free (buf);
return;
}
}
break;
case R_ANAL_OP_TYPE_POP:
break;