Skip to content

Commit

Permalink
[TO BE REVERTED] bin.c: Double-free
Browse files Browse the repository at this point in the history
  • Loading branch information
kazarmy committed May 2, 2024
1 parent ba780a7 commit f0378a8
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions librz/bin/bin.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,8 @@ RZ_API void rz_bin_reloc_free(RZ_NULLABLE RzBinReloc *reloc) {
if (!reloc) {
return;
}
/**
* TODO: leak in bin_elf, but it will cause double free in bin_pe if free here,
* Because in the bin_elf implementation RzBinObject->imports and RzBinObject->relocs->imports
* are two pieces of data, but they are linked to each other in bin_pe
*/
// rz_bin_import_free(reloc->import);
// rz_bin_symbol_free(reloc->symbol);
rz_bin_import_free(reloc->import);
rz_bin_symbol_free(reloc->symbol);
free(reloc);
}

Expand Down

0 comments on commit f0378a8

Please sign in to comment.