Fix some COVS

This commit is contained in:
Álvaro Felipe Melchor 2015-07-24 23:59:38 +02:00 committed by pancake
parent c8ba1fa33c
commit 050c2fe9f8
5 changed files with 8 additions and 3 deletions

View File

@ -485,6 +485,7 @@ encoded_catch_handler_list handlers
dprintf (" method code_offset: %u\n", (ut32)MC);
free (name);
}
free (class_name);
return methods;
}

View File

@ -2378,6 +2378,7 @@ static void cmd_agraph_edge (RCore *core, const char *input) {
args = r_str_argv (input, &n_args);
if (n_args != 2) {
r_cons_printf("Wrong arguments\n");
r_str_argv_free (args);
break;
}
@ -2385,6 +2386,7 @@ static void cmd_agraph_edge (RCore *core, const char *input) {
v = r_agraph_get_node (core->graph, args[1]);
if (!u || !v) {
r_cons_printf ("Nodes not found!\n");
r_str_argv_free (args);
break;
}
r_agraph_add_edge (core->graph, u, v);

View File

@ -588,11 +588,13 @@ static int dump_maps(RCore *core, int perm, const char *filename) {
//TODO: use mmap here. we need a portable implementation
if (!buf) {
eprintf ("Cannot allocate 0x%08"PFMT64x" bytes\n", map->size);
free (buf);
/// XXX: TODO: read by blocks!!1
continue;
}
if (map->size > MAX_MAP_SIZE) {
eprintf ("Do not dumping 0x%08"PFMT64x" because it's too big\n", map->addr);
free (buf);
continue;
}
r_io_read_at (core->io, map->addr, buf, map->size);

View File

@ -68,8 +68,8 @@ static RList *backtrace_x86_64_anal(RDebug *dbg, ut64 at) {
if (at == UT64_MAX) {
//_rsp = r_reg_get_value (reg, r_reg_get (reg, "rsp", R_REG_TYPE_GPR));
_rbp = r_reg_get_value (reg, r_reg_get (reg, "rbp", R_REG_TYPE_GPR));
//} else {
// _rsp = _rbp = at;
} else {
_rbp = at;
}
list = r_list_new ();

View File

@ -402,7 +402,7 @@ static RIODesc *r_io_zip_open(RIO *io, const char *file, int rw, int mode) {
if (!res) {
eprintf ("Failed to open the archive %s and file %s\n",
zip_filename, filename_in_zipfile);
free (zfo);
//free (zfo); zfo is already freed by r_io_desc_new
r_io_desc_free (res);
res = NULL;
}