linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 3/3] btrfs: dereferencing freed memory
@ 2010-03-20 11:24 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2010-03-20 11:24 UTC (permalink / raw)
  To: Chris Mason
  Cc: Yan Zheng, Josef Bacik, Sage Weil, Al Viro, linux-btrfs,
	linux-kernel, kernel-janitors

The original code dereferenced range on the next line.

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index be9b5df..d7ab56c 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -1378,6 +1378,7 @@ static int btrfs_ioctl_defrag(struct file *file, void __user *argp)
 					   sizeof(*range))) {
 				ret = -EFAULT;
 				kfree(range);
+				goto out;
 			}
 			/* compression requires us to start the IO */
 			if ((range->flags & BTRFS_DEFRAG_RANGE_COMPRESS)) {

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-03-20 11:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-20 11:24 [patch 3/3] btrfs: dereferencing freed memory Dan Carpenter

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).