* [patch 1/2] cifs: add kfree() on error path
@ 2010-10-27 21:19 Dan Carpenter
2010-10-27 23:40 ` Jeff Layton
2010-10-28 0:57 ` Steve French
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2010-10-27 21:19 UTC (permalink / raw)
To: Steve French
Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA,
samba-technical-w/Ol4Ecudpl8XjKLYN78aQ,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA
We leak 256 bytes here on this error path.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index 45af003..06a006b 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -1353,6 +1353,7 @@ static int cifs_writepages(struct address_space *mapping,
if (!experimEnabled && tcon->ses->server->secMode &
(SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) {
cifsFileInfo_put(open_file);
+ kfree(iov);
return generic_writepages(mapping, wbc);
}
cifsFileInfo_put(open_file);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [patch 1/2] cifs: add kfree() on error path
2010-10-27 21:19 [patch 1/2] cifs: add kfree() on error path Dan Carpenter
@ 2010-10-27 23:40 ` Jeff Layton
2010-10-28 0:57 ` Steve French
1 sibling, 0 replies; 3+ messages in thread
From: Jeff Layton @ 2010-10-27 23:40 UTC (permalink / raw)
To: Dan Carpenter
Cc: Steve French, linux-cifs-u79uwXL29TY76Z2rM5mHXA,
samba-technical-w/Ol4Ecudpl8XjKLYN78aQ,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA
On Wed, 27 Oct 2010 23:19:32 +0200
Dan Carpenter <error27@gmail.com> wrote:
> We leak 256 bytes here on this error path.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
>
> diff --git a/fs/cifs/file.c b/fs/cifs/file.c
> index 45af003..06a006b 100644
> --- a/fs/cifs/file.c
> +++ b/fs/cifs/file.c
> @@ -1353,6 +1353,7 @@ static int cifs_writepages(struct address_space *mapping,
> if (!experimEnabled && tcon->ses->server->secMode &
> (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) {
> cifsFileInfo_put(open_file);
> + kfree(iov);
> return generic_writepages(mapping, wbc);
> }
> cifsFileInfo_put(open_file);
Good catch.
Acked-by: Jeff Layton <jlayton@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch 1/2] cifs: add kfree() on error path
2010-10-27 21:19 [patch 1/2] cifs: add kfree() on error path Dan Carpenter
2010-10-27 23:40 ` Jeff Layton
@ 2010-10-28 0:57 ` Steve French
1 sibling, 0 replies; 3+ messages in thread
From: Steve French @ 2010-10-28 0:57 UTC (permalink / raw)
To: Dan Carpenter
Cc: Steve French, linux-cifs-u79uwXL29TY76Z2rM5mHXA,
samba-technical-w/Ol4Ecudpl8XjKLYN78aQ,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA
On Wed, Oct 27, 2010 at 4:19 PM, Dan Carpenter <error27@gmail.com> wrote:
> We leak 256 bytes here on this error path.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
>
> diff --git a/fs/cifs/file.c b/fs/cifs/file.c
> index 45af003..06a006b 100644
> --- a/fs/cifs/file.c
> +++ b/fs/cifs/file.c
> @@ -1353,6 +1353,7 @@ static int cifs_writepages(struct address_space *mapping,
> if (!experimEnabled && tcon->ses->server->secMode &
> (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) {
> cifsFileInfo_put(open_file);
> + kfree(iov);
> return generic_writepages(mapping, wbc);
> }
> cifsFileInfo_put(open_file);
Yes. obviously correct.- merged.
--
Thanks,
Steve
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-10-28 0:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-27 21:19 [patch 1/2] cifs: add kfree() on error path Dan Carpenter
2010-10-27 23:40 ` Jeff Layton
2010-10-28 0:57 ` Steve French
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox