Fix #11870 regression in rbin internal api change.

This commit is contained in:
David CARLIER 2018-10-23 23:11:40 +01:00 committed by radare
parent b56af23ee7
commit ce50039ce3
5 changed files with 5 additions and 4 deletions

View File

@ -73,6 +73,7 @@ static bool load_bytes(RBinFile *bf, void **bin_obj, const ut8 *buf, ut64 sz, ut
if (bf && bf->o && bf->o->bin_obj) {
*bin_obj = bf->o->bin_obj = dol;
}
free (dol);
return true;
}
free (dol);

View File

@ -880,7 +880,7 @@ static bool load(RBinFile *bf) {
const ut8 *bytes = bf ? r_buf_buffer (bf->buf) : NULL;
ut64 sz = bf ? r_buf_size (bf->buf): 0;
ut64 la = (bf && bf->o) ? bf->o->loadaddr: 0;
return load_bytes (bf, &bf->o->bin_obj, bytes, sz, la, bf? bf->sdb: NULL);
return load_bytes (bf, bf? &bf->o->bin_obj: NULL, bytes, sz, la, bf? bf->sdb: NULL);
}
static RList *entries(RBinFile *bf) {

View File

@ -61,7 +61,7 @@ static bool load(RBinFile *bf) {
const ut8 *bytes = bf ? r_buf_buffer (bf->buf) : NULL;
ut64 sz = bf ? r_buf_size (bf->buf): 0;
ut64 la = (bf && bf->o) ? bf->o->loadaddr: 0;
return load_bytes (bf, &bf->o->bin_obj, bytes, sz, la, bf? bf->sdb: NULL);
return load_bytes (bf, bf? &bf->o->bin_obj: NULL, bytes, sz, la, bf? bf->sdb: NULL);
}
static int destroy(RBinFile *bf) {

View File

@ -70,7 +70,7 @@ static bool load(RBinFile *bf) {
const ut8 *bytes = bf ? r_buf_buffer (bf->buf) : NULL;
ut64 sz = bf ? r_buf_size (bf->buf): 0;
ut64 la = (bf && bf->o) ? bf->o->loadaddr: 0;
return load_bytes (bf, &bf->o->bin_obj, bytes, sz, la, bf? bf->sdb: NULL);
return load_bytes (bf, bf? &bf->o->bin_obj: NULL, bytes, sz, la, bf? bf->sdb: NULL);
}
static ut64 baddr(RBinFile *bf) {

View File

@ -21,7 +21,7 @@ static bool load(RBinFile *bf) {
const ut8 *bytes = bf? r_buf_buffer (bf->buf): NULL;
ut64 sz = bf? r_buf_size (bf->buf): 0;
ut64 la = (bf && bf->o)? bf->o->loadaddr: 0;
return load_bytes (bf, &bf->o->bin_obj, bytes, sz, la, bf? bf->sdb: NULL);
return load_bytes (bf, bf? &bf->o->bin_obj: NULL, bytes, sz, la, bf? bf->sdb: NULL);
}
static int destroy(RBinFile *bf) {