Kill io->buffer ##io

This commit is contained in:
condret 2022-12-02 03:27:55 +01:00
parent 006a23ab39
commit 36bf340b4e
4 changed files with 0 additions and 12 deletions

View File

@ -7135,14 +7135,8 @@ R_API int r_core_disasm_pde(RCore *core, int nb_opcodes, int mode) {
}
REsil *esil = core->anal->esil;
RPVector ocache = core->io->cache;
RCache *ocacheb = core->io->buffer;
const int ocached = core->io->cached;
if (ocache.v.a) {
if (ocacheb && ocacheb->len) {
RCache *c = r_cache_new ();
r_cache_set (c, ocacheb->base, ocacheb->buf, ocacheb->len);
core->io->buffer = c;
}
RPVector *vec = (RPVector *)r_vector_clone ((RVector *)&ocache);
vec->v.free = NULL;
core->io->cache = *vec;
@ -7266,7 +7260,6 @@ R_API int r_core_disasm_pde(RCore *core, int nb_opcodes, int mode) {
RIOCache *c = (RIOCache *)*it;
r_skyline_add (&core->io->cache_skyline, c->itv, c);
}
core->io->buffer = ocacheb;
core->io->cached = ocached;
r_config_hold_restore (chold);
r_config_hold_free (chold);

View File

@ -121,7 +121,6 @@ typedef struct r_io_t {
RIDStorage *files; // RIODescs accessible by their fd
RIDStorage *maps; // RIOMaps accessible by their id
RIDStorage *banks; // RIOBanks accessible by their id
RCache *buffer;
RPVector cache;
RSkyline cache_skyline;
ut8 *write_mask;

View File

@ -33,7 +33,6 @@ R_API void r_io_init(RIO* io) {
R_API void r_io_free(RIO *io) {
if (io) {
r_io_fini (io);
r_cache_free (io->buffer);
free (io);
}
}

View File

@ -20,7 +20,6 @@ R_API void r_io_cache_init(RIO *io) {
r_return_if_fail (io);
r_pvector_init (&io->cache, (RPVectorFree)cache_item_free);
r_skyline_init (&io->cache_skyline);
io->buffer = r_cache_new ();
io->cached = 0;
}
@ -28,8 +27,6 @@ R_API void r_io_cache_fini(RIO *io) {
r_return_if_fail (io);
r_pvector_fini (&io->cache);
r_skyline_fini (&io->cache_skyline);
r_cache_free (io->buffer);
io->buffer = NULL;
io->cached = 0;
}