mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-28 15:41:38 +00:00
Fix null deref in quit when loading corrupted machos ##bin
This commit is contained in:
parent
50d0e82e9a
commit
00b76ab433
@ -2057,10 +2057,12 @@ void *MACH0_(mach0_free)(struct MACH0_(obj_t) *mo) {
|
||||
}
|
||||
|
||||
size_t i;
|
||||
for (i = 0; !mo->symbols[i].last; i++) {
|
||||
free (mo->symbols[i].name);
|
||||
if (mo->symbols) {
|
||||
for (i = 0; !mo->symbols[i].last; i++) {
|
||||
free (mo->symbols[i].name);
|
||||
}
|
||||
free (mo->symbols);
|
||||
}
|
||||
free (mo->symbols);
|
||||
free (mo->segs);
|
||||
free (mo->sects);
|
||||
free (mo->symtab);
|
||||
|
Loading…
Reference in New Issue
Block a user