Skip to content

Commit

Permalink
nilfs2: fix memory leak in nilfs_ioctl_clean_segments
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ryusuke Konishi committed May 22, 2009
1 parent 1406de8 commit d504685
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/nilfs2/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d504685

Please sign in to comment.