Fix null deref in aao (#17313)

This commit is contained in:
pancake 2020-07-20 09:19:52 +02:00 committed by GitHub
parent dd8120a129
commit 52a64537fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -687,7 +687,7 @@ static RBinReloc *reloc_convert(struct Elf_(r_bin_elf_obj_t) *bin, RBinElfReloc
#undef ADD
free (r);
return 0;
return NULL;
}
static RList* relocs(RBinFile *bf) {

View File

@ -204,8 +204,10 @@ static RCoreObjc *core_objc_new(RCore *core) {
}
static void core_objc_free(RCoreObjc *o) {
ht_up_free (o->up);
free (o);
if (o) {
ht_up_free (o->up);
free (o);
}
}
static bool objc_find_refs(RCore *core) {