Commit d5046853 authored by Ryusuke Konishi's avatar Ryusuke Konishi

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: default avatarKentaro Suzuki <k_suzuki@ms.sylc.co.jp>
Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
parent 1406de8e
......@@ -576,7 +576,7 @@ static int nilfs_ioctl_clean_segments(struct inode *inode, struct file *filp,
ret = nilfs_clean_segments(inode->i_sb, argv, kbufs);
out_free:
while (--n > 0)
while (--n >= 0)
vfree(kbufs[n]);
kfree(kbufs[4]);
return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment