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.
@@ -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)
