diff options
author | ixhamza <[email protected]> | 2022-06-16 02:26:12 +0500 |
---|---|---|
committer | GitHub <[email protected]> | 2022-06-15 14:26:12 -0700 |
commit | 10891b37fa8f2cbf71ec529fc3808113d94d52ef (patch) | |
tree | 4a3eb6b39fd41b254dba5ee215b2e325c28e48a2 /lib/libzfs/libzfs_sendrecv.c | |
parent | dd8671459f59484b1c20fc1b5e1c3acaa2a290c1 (diff) |
libzfs: Prevent overridding of error code
zfs_send_cb_impl fails to report error for some flags.
Use second error variable for send_conclusion_record.
Reviewed-by: Ryan Moeller <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ameer Hamza <[email protected]>
Closes #13558
Diffstat (limited to 'lib/libzfs/libzfs_sendrecv.c')
-rw-r--r-- | lib/libzfs/libzfs_sendrecv.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libzfs/libzfs_sendrecv.c b/lib/libzfs/libzfs_sendrecv.c index f7b2a0e87..a27446f54 100644 --- a/lib/libzfs/libzfs_sendrecv.c +++ b/lib/libzfs/libzfs_sendrecv.c @@ -2366,9 +2366,9 @@ zfs_send_cb_impl(zfs_handle_t *zhp, const char *fromsnap, const char *tosnap, * there was some error, because it might not be totally * failed. */ - err = send_conclusion_record(outfd, NULL); - if (err != 0) - return (zfs_standard_error(zhp->zfs_hdl, err, errbuf)); + int err2 = send_conclusion_record(outfd, NULL); + if (err2 != 0) + return (zfs_standard_error(zhp->zfs_hdl, err2, errbuf)); } return (err || sdd.err); |