linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Marcelo Tosatti <marcelo@conectiva.com.br>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-ntfs-dev@lists.sourceforge.net
Subject: [2.4] invalid kfree in ntfs_printcb
Date: Sat, 31 Jan 2004 15:58:12 +1100	[thread overview]
Message-ID: <20040131045812.GA19629@gondor.apana.org.au> (raw)

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

Hi:

This patch fixes a potential double kfree in ntfs_printcb in 2.4.24.

Cheers,
-- 
Debian GNU/Linux 3.0 is out! ( http://www.debian.org/ )
Email:  Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

[-- Attachment #2: p --]
[-- Type: text/plain, Size: 798 bytes --]

Index: kernel-2.4/fs/ntfs/fs.c
===================================================================
RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.4/fs/ntfs/fs.c,v
retrieving revision 1.1.1.15
diff -u -r1.1.1.15 fs.c
--- kernel-2.4/fs/ntfs/fs.c	28 Nov 2003 18:26:21 -0000	1.1.1.15
+++ kernel-2.4/fs/ntfs/fs.c	31 Jan 2004 04:47:51 -0000
@@ -199,7 +199,7 @@
 		ntfs_debug(DEBUG_OTHER, "%s(): Skipping unrepresentable "
 				"file.\n", __FUNCTION__);
 		err = 0;
-		goto err_ret;
+		goto err_noname;
 	}
 	if (!show_sys_files && inum < 0x10UL) {
 		ntfs_debug(DEBUG_OTHER, "%s(): Skipping system file (%s).\n",
@@ -233,8 +233,9 @@
 	if (err)
 		nf->ret_code = err;
 err_ret:
-	nf->namelen = 0;
 	ntfs_free(nf->name);
+err_noname:
+	nf->namelen = 0;
 	nf->name = NULL;
 	return err;
 }

             reply	other threads:[~2004-01-31  4:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-31  4:58 Herbert Xu [this message]
2004-02-13 22:56 ` [2.4] off-by-one kmalloc in ntfs Herbert Xu
2004-02-14 12:47   ` [Linux-NTFS-Dev] " Szakacsits Szabolcs
2004-02-15  1:26     ` Anton Altaparmakov
2004-02-15  1:36       ` Anton Altaparmakov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040131045812.GA19629@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-ntfs-dev@lists.sourceforge.net \
    --cc=marcelo@conectiva.com.br \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).