aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/dwarf.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/kernel/dwarf.c')
-rw-r--r--arch/sh/kernel/dwarf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/sh/kernel/dwarf.c b/arch/sh/kernel/dwarf.c
index 3576b709f052..88d28ec3780a 100644
--- a/arch/sh/kernel/dwarf.c
+++ b/arch/sh/kernel/dwarf.c
@@ -892,18 +892,18 @@ static struct unwinder dwarf_unwinder = {
892 892
893static void dwarf_unwinder_cleanup(void) 893static void dwarf_unwinder_cleanup(void)
894{ 894{
895 struct dwarf_cie *cie; 895 struct dwarf_cie *cie, *cie_tmp;
896 struct dwarf_fde *fde; 896 struct dwarf_fde *fde, *fde_tmp;
897 897
898 /* 898 /*
899 * Deallocate all the memory allocated for the DWARF unwinder. 899 * Deallocate all the memory allocated for the DWARF unwinder.
900 * Traverse all the FDE/CIE lists and remove and free all the 900 * Traverse all the FDE/CIE lists and remove and free all the
901 * memory associated with those data structures. 901 * memory associated with those data structures.
902 */ 902 */
903 list_for_each_entry(cie, &dwarf_cie_list, link) 903 list_for_each_entry_safe(cie, cie_tmp, &dwarf_cie_list, link)
904 kfree(cie); 904 kfree(cie);
905 905
906 list_for_each_entry(fde, &dwarf_fde_list, link) 906 list_for_each_entry_safe(fde, fde_tmp, &dwarf_fde_list, link)
907 kfree(fde); 907 kfree(fde);
908 908
909 kmem_cache_destroy(dwarf_reg_cachep); 909 kmem_cache_destroy(dwarf_reg_cachep);