[PATCH] minor cleanup in check_reuse_initrd

Michael Neuling mikey at neuling.org
Sun Jun 10 03:39:52 EDT 2007


Signed-off-by: Michael Neuling <mikey at neuling.org>
---
We are probably full of this stuff but...

 kexec/kexec.c |    3 +++
 1 file changed, 3 insertions(+)

Index: kexec-tools-testing/kexec/kexec.c
===================================================================
--- kexec-tools-testing.orig/kexec/kexec.c
+++ kexec-tools-testing/kexec/kexec.c
@@ -788,6 +788,9 @@ void check_reuse_initrd(void)
 	if (strstr(line, "retain_initrd") == NULL)
 		die("unrecoverable error: current boot didn't "
 		    "retain the initrd for reuse.\n");
+	if (line)
+		free(line);
+	close(fp);
 }
 
 /* Arch hook for reuse_initrd */



More information about the kexec mailing list