On Thu, Feb 20, 2014 at 04:02:29PM +0100, Lukas Czerner wrote: > 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@xxxxxxxxxx> Thanks, applied. - Ted -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html