Issue 27734: binutils:fuzz_readelf: Abrt with empty stacktrace (#4945)

Clear static vars after freeing, to prevent a double-free on the next
test iteration.
This commit is contained in:
Alan Modra 2021-01-20 23:32:17 +10:30 committed by GitHub
parent c3d69abf14
commit 9de297cc73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -47,8 +47,11 @@ LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
unlink(filename);
free (dump_ctf_symtab_name);
dump_ctf_symtab_name = NULL;
free (dump_ctf_strtab_name);
dump_ctf_strtab_name = NULL;
free (dump_ctf_parent_name);
dump_ctf_parent_name = NULL;
return 0;
}