Blame SOURCES/kexec-tools-2.0.15-ppc64-fix-leak-while-checking-for-cohere.patch

cf4a81
From 69431282f075ab723c4886f20aa248976920aaae Mon Sep 17 00:00:00 2001
cf4a81
From: Hari Bathini <hbathini@linux.vnet.ibm.com>
cf4a81
Date: Tue, 29 Aug 2017 23:08:02 +0530
cf4a81
Subject: [PATCH] kexec-tools: ppc64: fix leak while checking for coherent
cf4a81
 device memory
cf4a81
cf4a81
Signed-off-by: Hari Bathini <hbathini@linux.vnet.ibm.com>
cf4a81
Signed-off-by: Simon Horman <horms@verge.net.au>
cf4a81
Signed-off-by: Pingfan Liu <piliu@redhat.com>
cf4a81
---
cf4a81
 kexec/arch/ppc64/crashdump-ppc64.c | 1 +
cf4a81
 1 file changed, 1 insertion(+)
cf4a81
cf4a81
diff --git a/kexec/arch/ppc64/crashdump-ppc64.c b/kexec/arch/ppc64/crashdump-ppc64.c
cf4a81
index 7ea3983..bc9f948 100644
cf4a81
--- a/kexec/arch/ppc64/crashdump-ppc64.c
cf4a81
+++ b/kexec/arch/ppc64/crashdump-ppc64.c
cf4a81
@@ -217,6 +217,7 @@ static int is_coherent_device_mem(const char *fname)
cf4a81
 			break;
cf4a81
 		}
cf4a81
 		if (!strncmp(buf, "ibm,coherent-device-memory", 26)) {
cf4a81
+			fclose(file);
cf4a81
 			ret = 1;
cf4a81
 			break;
cf4a81
 		}
cf4a81
-- 
cf4a81
2.7.4
cf4a81