From: Kirill Korotaev <kirillx@7ka.mipt.ru>
To: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] memory leak in devpts in 2.4.x
Date: Sat, 10 Apr 2004 09:51:37 +0400 [thread overview]
Message-ID: <403331971.20040410095137@7ka.mipt.ru> (raw)
[-- 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:
next reply other threads:[~2004-04-10 5:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-10 5:51 Kirill Korotaev [this message]
2004-04-10 6:11 ` [PATCH] memory access to free memory " Kirill Korotaev
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=403331971.20040410095137@7ka.mipt.ru \
--to=kirillx@7ka.mipt.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.tosatti@cyclades.com \
/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
all inboxes | Powered by JetHome®