Whamcloud - gitweb
unix.c (main): Move the final print_resource_track call after
authorTheodore Ts'o <tytso@mit.edu>
Sun, 29 Jul 2001 16:26:46 +0000 (12:26 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 29 Jul 2001 16:26:46 +0000 (12:26 -0400)
the filesystem and context handle are closed

e2fsck/ChangeLog
e2fsck/unix.c

index 93ac264..b3089f2 100644 (file)
@@ -6,6 +6,8 @@
                (PRS): Only update the path to include /sbin at the
                beginning if the -c option is given, again to make it
                easier to find memory leaks.
+               (main): Move the final print_resource_track call after the
+               filesystem and the context are freed.
 
        * journal.c (e2fsck_journal_init_dev): Avoid memory leak if we
                need to search for the journal device.
index 1dae3d4..dc5c39e 100644 (file)
@@ -990,14 +990,14 @@ restart:
 
        e2fsck_write_bitmaps(ctx);
        
+       ext2fs_close(fs);
+       ctx->fs = NULL;
+       e2fsck_free_context(ctx);
+       
 #ifdef RESOURCE_TRACK
        if (ctx->options & E2F_OPT_TIME)
                print_resource_track(NULL, &ctx->global_rtrack);
 #endif
 
-       ext2fs_close(fs);
-       ctx->fs = NULL;
-       e2fsck_free_context(ctx);
-       
        return exit_value;
 }