summaryrefslogtreecommitdiff
path: root/kexec/arch/ppc64
diff options
context:
space:
mode:
Diffstat (limited to 'kexec/arch/ppc64')
-rw-r--r--kexec/arch/ppc64/crashdump-ppc64.c1
-rw-r--r--kexec/arch/ppc64/kexec-ppc64.c4
2 files changed, 4 insertions, 1 deletions
diff --git a/kexec/arch/ppc64/crashdump-ppc64.c b/kexec/arch/ppc64/crashdump-ppc64.c
index addd769..91f9521 100644
--- a/kexec/arch/ppc64/crashdump-ppc64.c
+++ b/kexec/arch/ppc64/crashdump-ppc64.c
@@ -161,6 +161,7 @@ static int get_dyn_reconf_crash_memory_ranges(void)
fprintf(stderr,
"Error: Number of crash memory ranges"
" excedeed the max limit\n");
+ fclose(file);
return -1;
}
diff --git a/kexec/arch/ppc64/kexec-ppc64.c b/kexec/arch/ppc64/kexec-ppc64.c
index 4e70b13..5b17740 100644
--- a/kexec/arch/ppc64/kexec-ppc64.c
+++ b/kexec/arch/ppc64/kexec-ppc64.c
@@ -200,8 +200,10 @@ static int get_dyn_reconf_base_ranges(void)
fclose(file);
return -1;
}
- if (nr_memory_ranges >= max_memory_ranges)
+ if (nr_memory_ranges >= max_memory_ranges) {
+ fclose(file);
return -1;
+ }
/*
* If the property is ibm,dynamic-memory-v2, the first 4 bytes