LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [2.6 patch] fs/9p/v9fs.c: memleak fix
@ 2007-10-19 14:05 Adrian Bunk
2007-10-23 22:30 ` Eric Van Hensbergen
0 siblings, 1 reply; 2+ messages in thread
From: Adrian Bunk @ 2007-10-19 14:05 UTC (permalink / raw)
To: Latchesar Ionkov, Eric Van Hensbergen
Cc: v9fs-developer, rminnich, linux-kernel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [2.6 patch] fs/9p/v9fs.c: memleak fix
2007-10-19 14:05 [2.6 patch] fs/9p/v9fs.c: memleak fix Adrian Bunk
@ 2007-10-23 22:30 ` Eric Van Hensbergen
0 siblings, 0 replies; 2+ messages in thread
From: Eric Van Hensbergen @ 2007-10-23 22:30 UTC (permalink / raw)
To: Adrian Bunk; +Cc: Latchesar Ionkov, v9fs-developer, rminnich, linux-kernel
On 10/19/07, Adrian Bunk <bunk@kernel.org> wrote:
> This patch fixes a memory leak introduced by
> commit ba17674fe02909fef049fd4b620a2805bdb8c693.
>
> Spotted by the Coverity checker.
>
> Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Eric Van Hensbergen <ericvh@gmail.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-10-23 22:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-19 14:05 [2.6 patch] fs/9p/v9fs.c: memleak fix Adrian Bunk
2007-10-23 22:30 ` Eric Van Hensbergen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).