diff --git a/librz/bin/format/mach0/mach0_relocs.c b/librz/bin/format/mach0/mach0_relocs.c index 5e78c38b00..0a53b1a2d0 100644 --- a/librz/bin/format/mach0/mach0_relocs.c +++ b/librz/bin/format/mach0/mach0_relocs.c @@ -507,7 +507,10 @@ static void parse_relocs_from_indirect_syms(RzSkipList *dst, struct MACH0_(obj_t break; } reloc->ord = j; - rz_skiplist_insert(dst, reloc); + RzSkipListNode *node = rz_skiplist_insert(dst, reloc); + if (node->data != reloc) { + free(reloc); + } } }