mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-15 01:10:01 +00:00
Fix more leaks
This commit is contained in:
parent
f8d3e50b57
commit
2e8363fdb6
libr
@ -357,6 +357,8 @@ static int dex_loadcode(RBinFile *arch, RBinDexObj *bin) {
|
||||
#endif
|
||||
if (c->class_data_offset==0) {
|
||||
// no method here, just class definition
|
||||
free (class_name);
|
||||
free (super_name);
|
||||
continue;
|
||||
}
|
||||
dprintf (" class_data_offset: %d\n", c->class_data_offset);
|
||||
|
@ -315,7 +315,7 @@ static RList* symbols(RBinFile *arch) {
|
||||
strncpy (ptr->bind, symbol[i].bind, R_BIN_SIZEOF_STRINGS);
|
||||
strncpy (ptr->type, symbol[i].type, R_BIN_SIZEOF_STRINGS);
|
||||
ptr->paddr = paddr;
|
||||
ptr->vaddr = vaddr;
|
||||
ptr->vaddr = vaddr;
|
||||
ptr->size = symbol[i].size;
|
||||
ptr->ordinal = symbol[i].ordinal;
|
||||
setsymord (bin, ptr->ordinal, ptr);
|
||||
@ -344,7 +344,9 @@ static RList* imports(RBinFile *arch) {
|
||||
RList *ret = NULL;
|
||||
int i;
|
||||
|
||||
if (arch && arch->o && arch->o->bin_obj) bin = arch->o->bin_obj;
|
||||
if (arch && arch->o && arch->o->bin_obj) {
|
||||
bin = arch->o->bin_obj;
|
||||
} else return NULL;
|
||||
|
||||
if (!(ret = r_list_new ()))
|
||||
return NULL;
|
||||
|
@ -70,6 +70,7 @@ R_API ut64 r_core_anal_address (RCore *core, ut64 addr) {
|
||||
int _rwx = -1;
|
||||
RIOSection *ios;
|
||||
RListIter *iter;
|
||||
if (!core->io) break;
|
||||
// sections
|
||||
r_list_foreach (core->io->sections, iter, ios) {
|
||||
if (addr >= ios->vaddr && addr < (ios->vaddr+ios->vsize)) {
|
||||
|
@ -1180,7 +1180,7 @@ static int cmd_print_pxA(RCore *core, int len, const char *data) {
|
||||
}
|
||||
int opsz = R_MAX (op.size, 1);
|
||||
if (show_cursor) {
|
||||
if (core->print->cur >=i && core->print->cur < i+opsz)
|
||||
if (core->print->cur >=i && core->print->cur < i+opsz)
|
||||
r_cons_invert (1, 1);
|
||||
}
|
||||
if (onechar) {
|
||||
@ -1195,16 +1195,18 @@ static int cmd_print_pxA(RCore *core, int len, const char *data) {
|
||||
}
|
||||
if (show_color) {
|
||||
if (!text) text = " ";
|
||||
r_cons_printf ("%s%s%s\x1b[0m", bgcolor, fgcolor, text);
|
||||
r_cons_printf ("%s%s%s\x1b[0m", bgcolor, fgcolor, text);
|
||||
} else {
|
||||
r_cons_printf ("%s", text? text: " ");
|
||||
}
|
||||
if (show_cursor) {
|
||||
if (core->print->cur >=i && core->print->cur < i+opsz)
|
||||
if (core->print->cur >=i && core->print->cur < i+opsz)
|
||||
r_cons_invert (0, 1);
|
||||
}
|
||||
i += opsz;
|
||||
}
|
||||
if (bgcolor_in_heap) free (bgcolor);
|
||||
|
||||
return R_TRUE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user