summaryrefslogtreecommitdiffstats
path: root/kexec/arch/ppc64/kexec-ppc64.c
diff options
context:
space:
mode:
Diffstat (limited to 'kexec/arch/ppc64/kexec-ppc64.c')
-rw-r--r--kexec/arch/ppc64/kexec-ppc64.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/kexec/arch/ppc64/kexec-ppc64.c b/kexec/arch/ppc64/kexec-ppc64.c
index 4e70b13b..5b177408 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