]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
Fix buffer refcount leak on an AGFL buffer.
authorNathan Scott <nathans@sgi.com>
Thu, 18 May 2006 15:51:18 +0000 (15:51 +0000)
committerNathan Scott <nathans@sgi.com>
Thu, 18 May 2006 15:51:18 +0000 (15:51 +0000)
Merge of master-melb:xfs-cmds:25966a by kenmcd.

libxfs/xfs_alloc.c

index 0e5699fb15c85d3bae4a6585a78a4e37b3587858..d0e2d846bdae156fb04b9fdb44dc10e989803d9c 100644 (file)
@@ -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;
 }