Whamcloud - gitweb
debugfs: fix filehandle leak in copy_file()
authorAndreas Dilger <adilger@dilger.ca>
Tue, 20 May 2014 22:30:35 +0000 (16:30 -0600)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 22 May 2014 21:54:36 +0000 (17:54 -0400)
commit9d8cd8c461136d2a2c4bf0879a792c227665b31c
treee938f382bf73b2e7ae32abd520e1d08236f3b949
parent90c5b4c9de8ea43e0994cc3a07cdc4c4c777623c
debugfs: fix filehandle leak in copy_file()

Fix a file handle leak for the target file in copy_file() when error
handlers return without closing the file.  Instead, clean up at the
end of the function to handle cleanup in normal and error cases.

Minor other code style cleanups.

Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
debugfs/debugfs.c