readelf: zero static vars after freeing
When readelf is processing more than one file, static bss vars won't start out as zero for the second file unless they are cleared. * readelf.c (process_symbol_table): Zero gnubuckets, gnuchains etc. after freeing.
This commit is contained in:
parent
89246a0e79
commit
b71d4fa7c3
|
@ -1,3 +1,8 @@
|
|||
2020-04-15 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* readelf.c (process_symbol_table): Zero gnubuckets, gnuchains
|
||||
etc. after freeing.
|
||||
|
||||
2020-04-15 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* readelf.c (get_group_flags): Translate text.
|
||||
|
|
|
@ -12260,16 +12260,24 @@ process_symbol_table (Filedata * filedata)
|
|||
free (lengths);
|
||||
}
|
||||
free (gnubuckets);
|
||||
gnubuckets = NULL;
|
||||
free (gnuchains);
|
||||
gnuchains = NULL;
|
||||
free (mipsxlat);
|
||||
mipsxlat = NULL;
|
||||
return TRUE;
|
||||
|
||||
err_out:
|
||||
free (gnubuckets);
|
||||
gnubuckets = NULL;
|
||||
free (gnuchains);
|
||||
gnuchains = NULL;
|
||||
free (mipsxlat);
|
||||
mipsxlat = NULL;
|
||||
free (buckets);
|
||||
buckets = NULL;
|
||||
free (chains);
|
||||
chains = NULL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue