From: Andrew Clayton Date: Thu, 12 Jul 2012 22:28:47 +0000 (+0100) Subject: file.c: Fix a file descriptor leak in readfile() X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=7fe652ab5738717ba443ae9de2b8f437103fd71b;hp=7fe652ab5738717ba443ae9de2b8f437103fd71b;p=ext%2Fsubsurface.git file.c: Fix a file descriptor leak in readfile() In file.c::readfile() the file was being opened once at fd declaration time and then again a few lines later and only being closed once. Remove the open() at fd declaration time leaving the later one where the fd check is done. Signed-off-by: Andrew Clayton Signed-off-by: Linus Torvalds ---