In git commit
fd486f32d15e I put some static variables used by
get_symbol_for_build_attribute in a file scope ba_cache struct. This
was to prevent leaks in get_symbol_for_build_attribute, and to tidy up
before readelf exited. The patch wasn't quite right though. When
readelf processes more than one file it was possible to double free
arrays allocated in get_symbol_for_build_attribute.
* readelf.c (process_file): Clean ba_cache.
+2020-03-14 Alan Modra <amodra@gmail.com>
+
+ * readelf.c (process_file): Clean ba_cache.
+
2020-03-14 Alan Modra <amodra@gmail.com>
* elfcomm.h (setup_archive): Update prototype.
free (filedata);
free (ba_cache.strtab);
+ ba_cache.strtab = NULL;
free (ba_cache.symtab);
+ ba_cache.symtab = NULL;
ba_cache.filedata = NULL;
return ret;