svn commit: r283521 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Andriy Gapon
avg at FreeBSD.org
Mon May 25 11:33:58 UTC 2015
Author: avg
Date: Mon May 25 11:33:57 2015
New Revision: 283521
URL: https://svnweb.freebsd.org/changeset/base/283521
Log:
MFC r282473: dmu_recv_end_check: don't leak hold if dsl_destroy_snapshot_check_impl fails
Modified:
stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c
Directory Properties:
stable/9/sys/ (props changed)
stable/9/sys/cddl/contrib/opensolaris/ (props changed)
Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c
==============================================================================
--- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Mon May 25 11:33:45 2015 (r283520)
+++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Mon May 25 11:33:57 2015 (r283521)
@@ -1755,7 +1755,7 @@ dmu_recv_end_check(void *arg, dmu_tx_t *
error = dsl_dataset_hold_obj(dp, obj, FTAG,
&snap);
if (error != 0)
- return (error);
+ break;
if (snap->ds_dir != origin_head->ds_dir)
error = SET_ERROR(EINVAL);
if (error == 0) {
@@ -1765,7 +1765,11 @@ dmu_recv_end_check(void *arg, dmu_tx_t *
obj = snap->ds_phys->ds_prev_snap_obj;
dsl_dataset_rele(snap, FTAG);
if (error != 0)
- return (error);
+ break;
+ }
+ if (error != 0) {
+ dsl_dataset_rele(origin_head, FTAG);
+ return (error);
}
}
error = dsl_dataset_clone_swap_check_impl(drc->drc_ds,
More information about the svn-src-stable-9
mailing list