patch-2.1.89 linux/fs/ntfs/inode.c

Next file: linux/fs/open.c
Previous file: linux/fs/ntfs/fs.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.88/linux/fs/ntfs/inode.c linux/fs/ntfs/inode.c
@@ -289,8 +289,14 @@
 void ntfs_clear_inode(ntfs_inode *ino)
 {
 	int i;
+	if(!ino->attr){
+		ntfs_error("ntfs_clear_inode: double free\n");
+		return;
+	}
 	ntfs_free(ino->attr);
+	ino->attr=0;
 	ntfs_free(ino->records);
+	ino->records=0;
 	for(i=0;i<ino->attr_count;i++)
 	{
 		if(ino->attrs[i].name)
@@ -305,6 +311,7 @@
 		}
 	}
 	ntfs_free(ino->attrs);
+	ino->attrs=0;
 }
 
 /* Check and fixup a MFT record */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov