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
2 changed files with 13 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue