Fix CID 1134906

This commit is contained in:
Anton Kochkov 2014-05-03 15:38:32 +04:00
parent 323f283daf
commit 3115a0cd03

View File

@ -489,13 +489,17 @@ static RList *r_core_asm_back_disassemble (RCore *core, ut64 addr, int len, ut64
buf = malloc (len + extra_padding);
if (hits == NULL || buf == NULL ){
if (hits) r_list_purge (hits);
if (hits) {
r_list_purge (hits);
free (hits);
}
if (buf) free (buf);
return NULL;
}
if (r_io_read_at (core->io, (addr + extra_padding)-len, buf, len+extra_padding) != len+extra_padding) {
r_list_purge (hits);
free (hits);
free (buf);
return NULL;
}