Fix null deref in xnu.kernelcache ##crash

* Reported by @xshad3 via huntr.dev
This commit is contained in:
pancake 2022-01-31 02:32:50 +01:00
parent 72ffc0271f
commit feaa4e7f73

View File

@ -242,7 +242,9 @@ static bool load_buffer(RBinFile *bf, void **bin_obj, RBuffer *buf, ut64 loadadd
beach:
r_buf_free (fbuf);
obj->cache_buf = NULL;
if (obj) {
obj->cache_buf = NULL;
}
MACH0_(mach0_free) (main_mach0);
return false;
}