From: Christoph Hellwig Date: Thu, 24 May 2007 05:21:11 +0000 (+1000) Subject: [XFS] Fix double free in xfs_buf_get_noaddr error handling path X-Git-Tag: v2.6.23-rc1~1056^2~32 X-Git-Url: http://git.sourceforge.jp/view?a=commitdiff_plain;h=ca165b88927e41ad18908d7b37f08ef81eae0bf8;p=linux-kernel-docs%2Flinux-2.6.git [XFS] Fix double free in xfs_buf_get_noaddr error handling path SGI-PV: 964983 SGI-Modid: xfs-linux-melb:xfs-kern:28639a Signed-off-by: Christoph Hellwig Signed-off-by: David Chinner Signed-off-by: Tim Shimmin --- diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c index 208daf58b8..192aa06509 100644 --- a/fs/xfs/linux-2.6/xfs_buf.c +++ b/fs/xfs/linux-2.6/xfs_buf.c @@ -792,8 +792,9 @@ xfs_buf_get_noaddr( fail_free_mem: while (--i >= 0) __free_page(bp->b_pages[i]); + _xfs_buf_free_pages(bp); fail_free_buf: - xfs_buf_free(bp); + xfs_buf_deallocate(bp); fail: return NULL; }