[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1358187343-15752-1-git-send-email-dinggnu@gmail.com>
Date: Mon, 14 Jan 2013 18:14:55 +0000
From: Cong Ding <dinggnu@...il.com>
To: "H. Peter Anvin" <hpa@...or.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, x86@...nel.org,
Matt Fleming <matt.fleming@...el.com>,
linux-kernel@...r.kernel.org
Cc: Cong Ding <dinggnu@...il.com>
Subject: [PATCH] x86: boot/compressed/mkpiggy.c: fix resource leakage
the file should be closed if it goes to error.
Signed-off-by: Cong Ding <dinggnu@...il.com>
---
arch/x86/boot/compressed/mkpiggy.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/boot/compressed/mkpiggy.c b/arch/x86/boot/compressed/mkpiggy.c
index 958a641..e29154f 100644
--- a/arch/x86/boot/compressed/mkpiggy.c
+++ b/arch/x86/boot/compressed/mkpiggy.c
@@ -58,6 +58,7 @@ int main(int argc, char *argv[])
if (fread(&olen, sizeof(olen), 1, f) != 1) {
perror(argv[1]);
+ fclose(f);
return 1;
}
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists