Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke...
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 22 May 2009 15:41:13 +0000 (08:41 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 22 May 2009 15:41:13 +0000 (08:41 -0700)
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2:
  nilfs2: fix memory leak in nilfs_ioctl_clean_segments

fs/nilfs2/ioctl.c

index 50ff3f2cdf24de8450340efca40acf6235aee23d..d6759b92006fe8b17d7c81ba79eb158e1665c0a9 100644 (file)
@@ -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;