[PATCH] kexec-tools: ppc64: fix leak while checking for coherent device memory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Hari Bathini <hbathini at linux.vnet.ibm.com>
---

* Follow-up to http://lists.infradead.org/pipermail/kexec/2017-August/019436.html


 kexec/arch/ppc64/crashdump-ppc64.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/kexec/arch/ppc64/crashdump-ppc64.c b/kexec/arch/ppc64/crashdump-ppc64.c
index 7ea3983..bc9f948 100644
--- a/kexec/arch/ppc64/crashdump-ppc64.c
+++ b/kexec/arch/ppc64/crashdump-ppc64.c
@@ -217,6 +217,7 @@ static int is_coherent_device_mem(const char *fname)
 			break;
 		}
 		if (!strncmp(buf, "ibm,coherent-device-memory", 26)) {
+			fclose(file);
 			ret = 1;
 			break;
 		}




[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux