patch-2.4.27 linux-2.4.27/fs/devpts/inode.c

Next file: linux-2.4.27/fs/dquot.c
Previous file: linux-2.4.27/fs/devfs/base.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.26/fs/devpts/inode.c linux-2.4.27/fs/devpts/inode.c
@@ -137,12 +137,12 @@
 
 	if ( devpts_parse_options(data,sbi) && !silent) {
 		printk("devpts: called with bogus options\n");
-		goto fail_free;
+		goto fail_inode;
 	}
 
 	inode = new_inode(s);
 	if (!inode)
-		goto fail_free;
+		goto fail_inode;
 	inode->i_ino = 1;
 	inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
 	inode->i_blocks = 0;
@@ -164,6 +164,8 @@
 	
 	printk("devpts: get root dentry failed\n");
 	iput(inode);
+fail_inode:
+	kfree(sbi->inodes);
 fail_free:
 	kfree(sbi);
 fail:

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)