the filesystem and context handle are closed
(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.
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;
}