From 24ceb248abfb0ee0cd0e7861e2bc83e6c8c61ad7 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Thu, 26 Jul 2001 09:02:56 -0400 Subject: [PATCH] pass1.c (e2fsck_pass1): Free ctx->block_ea_map at the end of pass 1. This avoids increasing the memory footprint of e2fsck by 10%! --- e2fsck/ChangeLog | 5 +++++ e2fsck/pass1.c | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/e2fsck/ChangeLog b/e2fsck/ChangeLog index 22b4708..af2125e 100644 --- a/e2fsck/ChangeLog +++ b/e2fsck/ChangeLog @@ -1,3 +1,8 @@ +2001-07-26 Theodore Tso + + * pass1.c (e2fsck_pass1): Free ctx->block_ea_map at the end of + pass 1. + 2001-07-25 Theodore Tso * pass1.c (check_ext_attr): Skip zero-length EA entries. diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c index 6d763d2..3df234d 100644 --- a/e2fsck/pass1.c +++ b/e2fsck/pass1.c @@ -646,6 +646,12 @@ void e2fsck_pass1(e2fsck_t ctx) if (ctx->invalid_bitmaps) handle_fs_bad_blocks(ctx); + /* We don't need the block_ea_map any more */ + if (ctx->block_ea_map) { + ext2fs_free_block_bitmap(ctx->block_ea_map); + ctx->block_ea_map = 0; + } + if (ctx->flags & E2F_FLAG_RESTART) { /* * Only the master copy of the superblock and block -- 1.8.3.1