diff options
Diffstat (limited to 'libdw/dwarf_end.c')
-rw-r--r-- | libdw/dwarf_end.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libdw/dwarf_end.c b/libdw/dwarf_end.c index 32b551df..2108063d 100644 --- a/libdw/dwarf_end.c +++ b/libdw/dwarf_end.c @@ -117,7 +117,11 @@ dwarf_end (Dwarf *dwarf) elf_end (dwarf->elf); /* Free the fake location list CU. */ - free (dwarf->fake_loc_cu); + if (dwarf->fake_loc_cu != NULL) + { + cu_free (dwarf->fake_loc_cu); + free (dwarf->fake_loc_cu); + } /* Free the context descriptor. */ free (dwarf); |