public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [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

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