]> err.no Git - linux-2.6/commitdiff
[XFS] Fix double free in xfs_buf_get_noaddr error handling path
authorChristoph Hellwig <hch@lst.de>
Thu, 24 May 2007 05:21:11 +0000 (15:21 +1000)
committerTim Shimmin <tes@chook.melbourne.sgi.com>
Sat, 14 Jul 2007 05:22:50 +0000 (15:22 +1000)
SGI-PV: 964983
SGI-Modid: xfs-linux-melb:xfs-kern:28639a

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
fs/xfs/linux-2.6/xfs_buf.c

index 208daf58b826765ca3f097c06a4dfc208e65701a..192aa0650919153b09a7427ff1e47b73f5ffe6f9 100644 (file)
@@ -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;
 }