]> git.tdb.fi Git - ext/subsurface.git/commitdiff
file.c: Fix a file descriptor leak in readfile()
authorAndrew Clayton <andrew@digital-domain.net>
Thu, 12 Jul 2012 22:28:47 +0000 (23:28 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 13 Jul 2012 01:19:47 +0000 (18:19 -0700)
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 <andrew@digital-domain.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

No differences found