aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2009-05-22 07:36:21 -0400
committerRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2009-05-22 07:49:04 -0400
commitd5046853634a8d73f28bad3cf68d182c4a99035d (patch)
treec294fce63b57763df341ab31189cd3c89529d879
parent1406de8e11eb043681297adf86d6892ff8efc27a (diff)
nilfs2: fix memory leak in nilfs_ioctl_clean_segments
This fixes a new memory leak problem in garbage collection. The problem was brought by the bugfix patch ("nilfs2: fix lock order reversal in nilfs_clean_segments ioctl"). Thanks to Kentaro Suzuki for finding this problem. Reported-by: Kentaro Suzuki <k_suzuki@ms.sylc.co.jp> Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
-rw-r--r--fs/nilfs2/ioctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nilfs2/ioctl.c b/fs/nilfs2/ioctl.c
index 50ff3f2cdf24..d6759b92006f 100644
--- a/fs/nilfs2/ioctl.c
+++ b/fs/nilfs2/ioctl.c
@@ -576,7 +576,7 @@ static int nilfs_ioctl_clean_segments(struct inode *inode, struct file *filp,
576 ret = nilfs_clean_segments(inode->i_sb, argv, kbufs); 576 ret = nilfs_clean_segments(inode->i_sb, argv, kbufs);
577 577
578 out_free: 578 out_free:
579 while (--n > 0) 579 while (--n >= 0)
580 vfree(kbufs[n]); 580 vfree(kbufs[n]);
581 kfree(kbufs[4]); 581 kfree(kbufs[4]);
582 return ret; 582 return ret;