Various mem leak fixes (#12400)

This commit is contained in:
David CARLIER 2018-12-04 16:23:09 +00:00 committed by radare
parent b6f2ebb20b
commit 9e20fe9bbb
3 changed files with 3 additions and 0 deletions

View File

@ -594,6 +594,7 @@ static ut64 num_callback(RNum *userptr, const char *str, int *ok) {
return r_reg_get_value (core->dbg->reg, r);
}
}
free (bptr);
return 0; // UT64_MAX;
} else {
int rows;

View File

@ -4472,6 +4472,7 @@ static void ds_print_calls_hints(RDisasmState *ds) {
ds_begin_comment (ds);
const char *fcn_type = r_type_func_ret (TDB, name);
if (!fcn_type || !*fcn_type) {
free (name);
return;
}
char *cmt = r_str_newf ("; %s%s%s(", fcn_type,

View File

@ -1590,6 +1590,7 @@ int r_print_format_struct_size(const char *f, RPrint *p, int mode, int n) {
if (newsize < 1) {
eprintf ("Cannot find size for `%s'\n", format);
free (structname);
free (o);
return 0;
}
if (format && newsize > 0) {