aboutsummaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorWill Andrews <[email protected]>2015-04-26 15:30:46 -0700
committerBrian Behlendorf <[email protected]>2015-05-04 10:28:18 -0700
commit50f9ea01499be508918e33923e004bf5dcf390e3 (patch)
tree64140636c49db9c8a87086fb3f1a0453cbeebf7b /module
parent859735c0954e89dd329729c6959df7cbaca1fdcc (diff)
Illumos 5814 - bpobj_iterate_impl(): Close a refcount leak iterating on a sublist.
5814 bpobj_iterate_impl(): Close a refcount leak iterating on a sublist. Reviewed by: Prakash Surya <[email protected]> Reviewed by: Matthew Ahrens <[email protected]> Reviewed by: Paul Dagnelie <[email protected]> Reviewed by: Simon Klinkert <[email protected]> Approved by: Gordon Ross <[email protected]> References: https://www.illumos.org/issues/5814 https://github.com/illumos/illumos-gate/commit/b67dde11 Ported-by: DHE <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #3368
Diffstat (limited to 'module')
-rw-r--r--module/zfs/bpobj.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/module/zfs/bpobj.c b/module/zfs/bpobj.c
index 7c8f932f5..25767e83f 100644
--- a/module/zfs/bpobj.c
+++ b/module/zfs/bpobj.c
@@ -301,8 +301,10 @@ bpobj_iterate_impl(bpobj_t *bpo, bpobj_itor_t func, void *arg, dmu_tx_t *tx,
if (free) {
err = bpobj_space(&sublist,
&used_before, &comp_before, &uncomp_before);
- if (err)
+ if (err != 0) {
+ bpobj_close(&sublist);
break;
+ }
}
err = bpobj_iterate_impl(&sublist, func, arg, tx, free);
if (free) {