]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
Fix use-after-free bug of e2fsck context structure.
authorTheodore Ts'o <tytso@mit.edu>
Mon, 25 Jul 2005 16:36:43 +0000 (11:36 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 25 Jul 2005 16:36:43 +0000 (11:36 -0500)
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
e2fsck/ChangeLog
e2fsck/unix.c

index 53cbbb0501e00c595ba2f57546b952ccf9b82e0e..deec7eabb3a18365a92fd2006580e72092219e52 100644 (file)
@@ -1,5 +1,8 @@
 2005-07-25  Theodore Ts'o  <tytso@mit.edu>
 
+       * unix.c (main): Fix a use-after-free bug of the e2fsck context
+               structure at the very end of the e2fsck run.
+
        * pass1.c (pass1_write_inode): Fix false positive from valgrind;
                don't do a needless structure copy via an assignment when
                it is a no-op.
index 1d74929d24cc4c8c494cde55d258bb76bd1895fb..6cbcb10c38d08470f18ed11c85ddb3f9038ee870 100644 (file)
@@ -1168,12 +1168,11 @@ restart:
        ctx->fs = NULL;
        free(ctx->filesystem_name);
        free(ctx->journal_name);
-       e2fsck_free_context(ctx);
-       
+
 #ifdef RESOURCE_TRACK
        if (ctx->options & E2F_OPT_TIME)
                print_resource_track(NULL, &ctx->global_rtrack);
 #endif
-
+       e2fsck_free_context(ctx);
        return exit_value;
 }