From: Nathan Scott Date: Thu, 18 May 2006 15:51:18 +0000 (+0000) Subject: Fix buffer refcount leak on an AGFL buffer. X-Git-Tag: v2.8.0~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cb4deb22fb25e3908b4f266908e691b75c12b9f7;p=thirdparty%2Fxfsprogs-dev.git Fix buffer refcount leak on an AGFL buffer. Merge of master-melb:xfs-cmds:25966a by kenmcd. --- diff --git a/libxfs/xfs_alloc.c b/libxfs/xfs_alloc.c index 0e5699fb1..d0e2d846b 100644 --- a/libxfs/xfs_alloc.c +++ b/libxfs/xfs_alloc.c @@ -1849,8 +1849,10 @@ xfs_alloc_fix_freelist( /* * Allocate as many blocks as possible at once. */ - if ((error = xfs_alloc_ag_vextent(&targs))) + if ((error = xfs_alloc_ag_vextent(&targs))) { + xfs_trans_brelse(tp, agflbp); return error; + } /* * Stop if we run out. Won't happen if callers are obeying * the restrictions correctly. Can happen for free calls @@ -1867,6 +1869,7 @@ xfs_alloc_fix_freelist( return error; } } + xfs_trans_brelse(tp, agflbp); args->agbp = agbp; return 0; }