summaryrefslogtreecommitdiffstats
path: root/libdw/dwarf_end.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdw/dwarf_end.c')
-rw-r--r--libdw/dwarf_end.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libdw/dwarf_end.c b/libdw/dwarf_end.c
index 60c9716e..4cc192c8 100644
--- a/libdw/dwarf_end.c
+++ b/libdw/dwarf_end.c
@@ -82,6 +82,8 @@ dwarf_end (dwarf)
{
if (dwarf != NULL)
{
+ rwlock_wrlock (dwarf->lock);
+
/* The search tree for the CUs. NB: the CU data itself is
allocated separately, but the abbreviation hash tables need
to be handled. */
@@ -103,6 +105,9 @@ dwarf_end (dwarf)
if (dwarf->free_elf)
elf_end (dwarf->elf);
+ /* Free the lock. */
+ rwlock_fini (dwarf->lock);
+
/* Free the context descriptor. */
free (dwarf);
}