From: Adrian Bunk <bunk@kernel.org>
To: Latchesar Ionkov <lucho@ionkov.net>,
Eric Van Hensbergen <ericvh@gmail.com>
Cc: v9fs-developer@lists.sourceforge.net, rminnich@sandia.gov,
linux-kernel@vger.kernel.org
Subject: [2.6 patch] fs/9p/v9fs.c: memleak fix
Date: Fri, 19 Oct 2007 16:05:30 +0200 [thread overview]
Message-ID: <20071019140530.GF3778@stusta.de> (raw)
This patch fixes a memory leak introduced by
commit ba17674fe02909fef049fd4b620a2805bdb8c693.
Spotted by the Coverity checker.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
---
--- linux-2.6/fs/9p/v9fs.c.old 2007-10-19 15:56:06.000000000 +0200
+++ linux-2.6/fs/9p/v9fs.c 2007-10-19 15:57:00.000000000 +0200
@@ -152,26 +152,27 @@ static void v9fs_parse_options(struct v9
case Opt_access:
s = match_strdup(&args[0]);
v9ses->flags &= ~V9FS_ACCESS_MASK;
if (strcmp(s, "user") == 0)
v9ses->flags |= V9FS_ACCESS_USER;
else if (strcmp(s, "any") == 0)
v9ses->flags |= V9FS_ACCESS_ANY;
else {
v9ses->flags |= V9FS_ACCESS_SINGLE;
v9ses->uid = simple_strtol(s, &e, 10);
if (*e != '\0')
v9ses->uid = ~0;
}
+ kfree(s);
break;
default:
continue;
}
}
}
/**
* v9fs_session_init - initialize session
* @v9ses: session information structure
* @dev_name: device being mounted
* @data: options
next reply other threads:[~2007-10-19 14:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-19 14:05 Adrian Bunk [this message]
2007-10-23 22:30 ` [2.6 patch] fs/9p/v9fs.c: memleak fix Eric Van Hensbergen
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=20071019140530.GF3778@stusta.de \
--to=bunk@kernel.org \
--cc=ericvh@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lucho@ionkov.net \
--cc=rminnich@sandia.gov \
--cc=v9fs-developer@lists.sourceforge.net \
/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