mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-11-14 04:18:11 +01:00
dwarf: error in unmap size arguments
This patch fixes an error in the unmapping of hash table memory when the dwarf hash table is resized.
This commit is contained in:
parent
0f24c6dec8
commit
24f27f02ac
1 changed files with 4 additions and 2 deletions
|
@ -524,9 +524,11 @@ dwarf_flush_rs_cache (struct dwarf_rs_cache *cache)
|
|||
cache->log_size = DWARF_DEFAULT_LOG_UNW_CACHE_SIZE;
|
||||
} else {
|
||||
if (cache->hash && cache->hash != cache->default_hash)
|
||||
munmap(cache->hash, DWARF_UNW_HASH_SIZE(cache->prev_log_size));
|
||||
munmap(cache->hash, DWARF_UNW_HASH_SIZE(cache->prev_log_size)
|
||||
* sizeof (cache->hash[0]));
|
||||
if (cache->buckets && cache->buckets != cache->default_buckets)
|
||||
munmap(cache->buckets, DWARF_UNW_CACHE_SIZE(cache->prev_log_size));
|
||||
munmap(cache->buckets, DWARF_UNW_CACHE_SIZE(cache->prev_log_size)
|
||||
* sizeof (cache->buckets[0]));
|
||||
GET_MEMORY(cache->hash, DWARF_UNW_HASH_SIZE(cache->log_size)
|
||||
* sizeof (cache->hash[0]));
|
||||
GET_MEMORY(cache->buckets, DWARF_UNW_CACHE_SIZE(cache->log_size)
|
||||
|
|
Loading…
Reference in a new issue