[2.4] invalid kfree in ntfs_printcb
diff mbox series

Message ID 20040131045812.GA19629@gondor.apana.org.au
State New, archived
Headers show
Series
  • [2.4] invalid kfree in ntfs_printcb
Related show

Commit Message

Herbert Xu Jan. 31, 2004, 4:58 a.m. UTC
Hi:

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

Cheers,

Patch
diff mbox series

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;
 }