Skip to contentSkip to conversation

e2fsprogs: avoid double free of ctx->filesystem_name in e2fsck

PATCH In review Matthias Koenig 2 participants 2 messages Apr 7, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 e2fsprogs: avoid double free of ctx->filesystem_name in e2fsck

Hi,

in current git there is a double free on ctx->filesystem_name in the end of main() and in e2fsck_free_context, causing e2fsck to abort at the end of pass5.

Matthias

e2fsck/unix.c +0 -1
Index: e2fsprogs-1.40.8+NEXT+git20080401/e2fsck/unix.c
===================================================================
@@ -1366,7 +1366,6 @@ no_journal:
 #endif
 	ext2fs_close(fs);
 	ctx->fs = NULL;
-	free(ctx->filesystem_name);
 	free(ctx->journal_name);
 
 	e2fsck_free_context(ctx);
#1 lore raw
Quoted 5 lines · Matthias Koenig

Hi,

in current git there is a double free on ctx->filesystem_name in the end of main() and in e2fsck_free_context, causing e2fsck to abort at the end of pass5.

Oops. Thanks for pointing that out. I've checked this into the master branch.

- Ted