* [PATCH] memory leak in devpts in 2.4.x
@ 2004-04-10 5:51 Kirill Korotaev
2004-04-10 6:11 ` [PATCH] memory access to free memory " Kirill Korotaev
0 siblings, 1 reply; 2+ messages in thread
From: Kirill Korotaev @ 2004-04-10 5:51 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 67 bytes --]
small memory leak in devpts_read_super() on error path.
Kirill
[-- Attachment #2: devpts.diff --]
[-- Type: application/octet-stream, Size: 717 bytes --]
--- ./fs/devpts/inode.c.dpts 2004-04-08 08:38:17.000000000 +0400
+++ ./fs/devpts/inode.c 2004-04-08 08:41:56.000000000 +0400
@@ -143,12 +143,12 @@ struct super_block *devpts_read_super(st
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;
@@ -170,6 +170,8 @@ struct super_block *devpts_read_super(st
printk("devpts: get root dentry failed\n");
iput(inode);
+fail_inode:
+ kfree(sbi->inodes);
fail_free:
kfree(sbi);
fail:
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-04-10 6:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-10 5:51 [PATCH] memory leak in devpts in 2.4.x Kirill Korotaev
2004-04-10 6:11 ` [PATCH] memory access to free memory " Kirill Korotaev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®