linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] e2fsprogs: avoid double free of ctx->filesystem_name in e2fsck
@ 2008-04-07 10:33 Matthias Koenig
  2008-04-07 15:51 ` Theodore Tso
  0 siblings, 1 reply; 2+ messages in thread
From: Matthias Koenig @ 2008-04-07 10:33 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: linux-ext4

[-- Attachment #1: Type: text/plain, Size: 222 bytes --]

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

Signed-off-by: Matthias Koenig <mkoenig@suse.de>


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: e2fsprogs-fsck_avoid_double_free.patch --]
[-- Type: text/x-patch, Size: 399 bytes --]

Index: e2fsprogs-1.40.8+NEXT+git20080401/e2fsck/unix.c
===================================================================
--- e2fsprogs-1.40.8+NEXT+git20080401.orig/e2fsck/unix.c
+++ 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);

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] e2fsprogs: avoid double free of ctx->filesystem_name in e2fsck
  2008-04-07 10:33 [PATCH] e2fsprogs: avoid double free of ctx->filesystem_name in e2fsck Matthias Koenig
@ 2008-04-07 15:51 ` Theodore Tso
  0 siblings, 0 replies; 2+ messages in thread
From: Theodore Tso @ 2008-04-07 15:51 UTC (permalink / raw)
  To: Matthias Koenig; +Cc: linux-ext4

On Mon, Apr 07, 2008 at 12:33:25PM +0200, Matthias Koenig wrote:
> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-04-07 15:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-07 10:33 [PATCH] e2fsprogs: avoid double free of ctx->filesystem_name in e2fsck Matthias Koenig
2008-04-07 15:51 ` Theodore Tso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).