e2fsprogs/debian
Lukas Czerner 47fee2ef6a e2fsprogs: introduce ext2fs_close_free() helper
Currently there are many uses of ext2fs_close() which might be wrong.
First of all ext2fs_close() does not set the ext2_filsys pointer to NULL
so the caller is responsible for clearing it, however there are some
cases there we do not do it.

Second of all very small number of users of ext2fs_close() actually
check the return value. If there is a problem in ext2fs_close() it will
not even free the ext2_filsys structure, but majority of users expect it
to do so.

To fix both problems this commit introduces a new helper
ext2fs_close_free() which will not only check for the return value and
free the ext2_filsys structure if the call to ext2fs_close2() failed,
but it will also set the ext2_filsys pointer to NULL.

Replace every use of ext2fs_close() in e2fsprogs tools with
ext2fs_close_free() - there is no real reason to keep using
ext2fs_close().

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
2014-07-05 21:06:48 -04:00
..
attic Many files: 2001-05-09 04:51:07 +00:00
scripts Work around Debian Bug #712530 2013-06-16 17:54:39 -04:00
source debian: Add explicit source format to specify 3.0 (quilt) 2011-10-09 22:24:13 -04:00
changelog Update release notes, etc. for final 1.42.10 release 2014-05-18 22:55:16 -04:00
comerr-dev.doc-base Use makeinfo --html instead of texi2html 2013-12-28 15:40:56 -05:00
comerr-dev.examples Synchronize with Debian release 1.21+1.22-WIP-0620-1 2001-06-22 23:05:23 -04:00
comerr-dev.files.in debian: add support for multiarch 2011-09-18 23:53:23 -04:00
compat debian: Update debhelper compat level to 7 2009-04-20 08:23:25 -04:00
control.in debian: fix udeb package support 2014-02-26 23:19:44 -05:00
copyright debian/copyright: update the debian copyright file 2011-09-25 01:55:28 -04:00
e2fsck-static.copyright debian: Update copyright files to point the correct common license files 2009-04-20 07:49:26 -04:00
e2fsck-static.files changelog, control, rules, e2fsck-static.files, e2fsprogs.copyright: 2001-05-21 02:48:41 +00:00
e2fsck-static.preinst debian: remove old symlinks to /usr/share/doc 2013-08-11 11:49:01 -04:00
e2fslibs-dev.doc-base Use makeinfo --html instead of texi2html 2013-12-28 15:40:56 -05:00
e2fslibs-dev.files.in debian: use more specific library file names in *.files 2012-12-28 13:55:13 -05:00
e2fslibs.files.in debian: use more specific library file names in *.files 2012-12-28 13:55:13 -05:00
e2fslibs.symbols e2fsprogs: introduce ext2fs_close_free() helper 2014-07-05 21:06:48 -04:00
e2fsprogs-udeb.shlibs.local debian: Fix dependencies field in the udeb packages 2008-09-04 22:39:47 -04:00
e2fsprogs.docs Many files: 2001-05-09 04:51:07 +00:00
e2fsprogs.files debian: add support for multiarch 2011-09-18 23:53:23 -04:00
e2fsprogs.preinst debian: remove old symlinks to /usr/share/doc 2013-08-11 11:49:01 -04:00
e2fsprogs.shlibs.local.in debian: Add a dependency on the 1.42~WIP-2011-1005-1 version of libcom_err 2011-10-05 15:32:36 -04:00
libblkid-dev.files.in debian: use more specific library file names in *.files 2012-12-28 13:55:13 -05:00
libblkid.copyright debian: Update copyright files to point the correct common license files 2009-04-20 07:49:26 -04:00
libblkid1.files.in debian: use more specific library file names in *.files 2012-12-28 13:55:13 -05:00
libblkid1.symbols Add more historical information into the debian/*.symbols files 2008-09-05 11:10:47 -04:00
libcomerr2.copyright Many files: 2001-05-09 04:51:07 +00:00
libcomerr2.files.in debian: use more specific library file names in *.files 2012-12-28 13:55:13 -05:00
libcomerr2.symbols debian: update libcomerr2.symbols 2011-10-05 03:04:41 -04:00
libss2.copyright Many files: 2001-06-15 22:54:34 +00:00
libss2.files.in debian: use more specific library file names in *.files 2012-12-28 13:55:13 -05:00
libss2.symbols Add more historical information into the debian/*.symbols files 2008-09-05 11:10:47 -04:00
libuuid1.copyright Change the license on the UUID library to be 3-clause BSD-style 2004-03-20 14:02:24 -05:00
libuuid1.files.in debian: use more specific library file names in *.files 2012-12-28 13:55:13 -05:00
libuuid1.postinst debian: Fix postinstall scripts when the user/group is in LDAP 2008-08-29 20:03:03 -04:00
libuuid1.postrm debian: Fix all postinst/prerm/postrm scripts to include debhelper additions 2008-01-01 02:20:07 -05:00
libuuid1.symbols Add more historical information into the debian/*.symbols files 2008-09-05 11:10:47 -04:00
rules debian: fix debian/rules compatibility with gmake 4.0 2014-05-18 22:29:31 -04:00
shlibs.local Separate out shared libraries out of e2fsprogs to real pacakges: 2003-07-25 07:03:00 -04:00
source.lintian-overrides debian: override source-is-missing false positive 2014-05-18 22:52:55 -04:00
ss-dev.examples Many files: 2001-05-09 04:51:07 +00:00
ss-dev.files.in debian: add support for multiarch 2011-09-18 23:53:23 -04:00
uuid-dev.README.Debian Update Debian packaging for 1.39+1.40-WIP-2006.10.02+dfsg-1 2006-10-04 09:12:35 -04:00
uuid-dev.copyright Update Debian packaging for 1.39+1.40-WIP-2006.10.02+dfsg-1 2006-10-04 09:12:35 -04:00
uuid-dev.files.in debian: add support for multiarch 2011-09-18 23:53:23 -04:00
uuid-runtime.copyright Add uuidd daemon to prevent duplicate time-based UUID's 2007-12-16 17:28:46 -05:00
uuid-runtime.files Add uuidd daemon to prevent duplicate time-based UUID's 2007-12-16 17:28:46 -05:00
uuid-runtime.lintian-overrides debian: Add uuid-runtime.lintian-overrides 2008-08-24 17:29:34 -04:00
uuid-runtime.postinst debian: Fix postinstall scripts when the user/group is in LDAP 2008-08-29 20:03:03 -04:00
uuid-runtime.postrm debian: Fix all postinst/prerm/postrm scripts to include debhelper additions 2008-01-01 02:20:07 -05:00
uuid-runtime.prerm debian: Add "set -e" to uuid-runtime's prerm script 2009-01-20 00:55:32 -05:00
uuid-runtime.shlibs.local Add uuidd daemon to prevent duplicate time-based UUID's 2007-12-16 17:28:46 -05:00
watch debian: Add debian/watch file 2008-08-24 17:29:33 -04:00