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 <prakash.surya@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Paul Dagnelie <paul.dagnelie@delphix.com>
Reviewed by: Simon Klinkert <simon.klinkert@gmail.com>
Approved by: Gordon Ross <gwr@nexenta.com>

References:
  https://www.illumos.org/issues/5814
  https://github.com/illumos/illumos-gate/commit/b67dde11

Ported-by: DHE <git@dehacked.net>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #3368
This commit is contained in:
Will Andrews 2015-04-26 15:30:46 -07:00 committed by Brian Behlendorf
parent 859735c095
commit 50f9ea0149

View File

@ -301,8 +301,10 @@ bpobj_iterate_impl(bpobj_t *bpo, bpobj_itor_t func, void *arg, dmu_tx_t *tx,
if (free) { if (free) {
err = bpobj_space(&sublist, err = bpobj_space(&sublist,
&used_before, &comp_before, &uncomp_before); &used_before, &comp_before, &uncomp_before);
if (err) if (err != 0) {
bpobj_close(&sublist);
break; break;
}
} }
err = bpobj_iterate_impl(&sublist, func, arg, tx, free); err = bpobj_iterate_impl(&sublist, func, arg, tx, free);
if (free) { if (free) {