Skip to content

Commit

Permalink
5814 bpobj_iterate_impl(): Close a refcount leak iterating on a sublist.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
wca authored and ahrens committed Apr 26, 2015
1 parent 8df1730 commit b67dde1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion usr/src/uts/common/fs/zfs/bpobj.c
Expand Up @@ -300,8 +300,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) {
Expand Down

0 comments on commit b67dde1

Please sign in to comment.