Whamcloud - gitweb
libext2fs: fix memory and fd leak in error path of unix_open()
authorTheodore Ts'o <tytso@mit.edu>
Mon, 17 Dec 2012 01:14:20 +0000 (20:14 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 17 Dec 2012 01:14:20 +0000 (20:14 -0500)
commit4e0bb5eb745009decac4c5836671ff4bef21ce2a
tree66faad28499fd188b5b7c9597a00f5e7f3e22ba6
parent1564150d3111f95317073ebc853b79aa5307cff5
libext2fs: fix memory and fd leak in error path of unix_open()

Fix a potential memory leak reported by Li Xi.  In addition, there
were possible error cases where the file descriptor would not be
properly closed, so fix those as well while we're at it.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reported-by: Li Xi <pkuelelixi@gmail.com>
lib/ext2fs/unix_io.c