Fix some memleaks related to code analysis
This commit is contained in:
parent
37061a780f
commit
6e5240c725
|
@ -1,4 +1,4 @@
|
|||
/* radare - LGPL - Copyright 2010-2017 - nibble, alvaro, pancake */
|
||||
/* radare - LGPL - Copyright 2010-2018 - nibble, alvaro, pancake */
|
||||
|
||||
#include <r_anal.h>
|
||||
#include <r_util.h>
|
||||
|
@ -405,7 +405,8 @@ static char *get_varname(RAnal *a, RAnalFunction *fcn, char type, const char *pf
|
|||
v_kind = *name_value;
|
||||
}
|
||||
if (v_kind == type && R_ABS (v_delta) == idx) {
|
||||
break;
|
||||
free (name_value);
|
||||
return varname;
|
||||
}
|
||||
free (varname);
|
||||
free (name_value);
|
||||
|
|
|
@ -1271,7 +1271,7 @@ static void core_anal_bytes(RCore *core, const ut8 *buf, int len, int nops, int
|
|||
RAnalHint *hint;
|
||||
RAnalEsil *esil = NULL;
|
||||
RAsmOp asmop;
|
||||
RAnalOp op;
|
||||
RAnalOp op = {0};
|
||||
ut64 addr;
|
||||
bool isFirst = true;
|
||||
unsigned int addrsize = r_config_get_i (core->config, "esil.addr.size");
|
||||
|
@ -1544,7 +1544,9 @@ static void core_anal_bytes(RCore *core, const ut8 *buf, int len, int nops, int
|
|||
//free (hint);
|
||||
free (mnem);
|
||||
r_anal_hint_free (hint);
|
||||
r_anal_op_fini (&op);
|
||||
}
|
||||
r_anal_op_fini (&op);
|
||||
if (fmt == 'j') {
|
||||
r_cons_printf ("]");
|
||||
r_cons_newline ();
|
||||
|
|
|
@ -601,6 +601,7 @@ R_API RList *r_core_get_boundaries_prot(RCore *core, int protection, const char
|
|||
protection = R_IO_RWX;
|
||||
}
|
||||
if (!core) {
|
||||
r_list_free (list);
|
||||
return NULL;
|
||||
}
|
||||
if (!core->io->va) {
|
||||
|
|
Loading…
Reference in New Issue