diff options
author | Philippe Waroquiers <philippe.waroquiers@skynet.be> | 2019-12-01 17:24:41 +0100 |
---|---|---|
committer | Philippe Waroquiers <philippe.waroquiers@skynet.be> | 2019-12-03 21:30:12 +0100 |
commit | 82f910ea9cce04b0faabfcd022d9d8949567541e (patch) | |
tree | 5e7a057817a4cd1b27e0a733ebd45609d10814db /gdb/frv-tdep.c | |
parent | e63ef0954d02bec8ecb9cf7ff9fc14adc45e8010 (diff) | |
download | gdb-82f910ea9cce04b0faabfcd022d9d8949567541e.zip gdb-82f910ea9cce04b0faabfcd022d9d8949567541e.tar.gz gdb-82f910ea9cce04b0faabfcd022d9d8949567541e.tar.bz2 |
Fix leak of symbol name in block_symbol_cache
A symbol not found inserted in the cache has a xstrdup-ed name
that must be freed, but only the struct block_symbol_cache is freed.
Add a function destroy_block_symbol_cache that clears all slots
before releasing the cache.
2019-12-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
* symtab.c (symbol_cache_clear_slot): Move close to cleared type.
(destroy_block_symbol_cache): New function.
(symbol_cache:~symbol_cache) Call destroy_block_symbol_cache.
(resize_symbol_cache): Likewise.
Diffstat (limited to 'gdb/frv-tdep.c')
0 files changed, 0 insertions, 0 deletions