mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 18:59:33 +03:00
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 <ryan@iXsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ameer Hamza <ahamza@ixsystems.com> Closes #13558
This commit is contained in:
parent
dd8671459f
commit
10891b37fa
@ -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
|
* there was some error, because it might not be totally
|
||||||
* failed.
|
* failed.
|
||||||
*/
|
*/
|
||||||
err = send_conclusion_record(outfd, NULL);
|
int err2 = send_conclusion_record(outfd, NULL);
|
||||||
if (err != 0)
|
if (err2 != 0)
|
||||||
return (zfs_standard_error(zhp->zfs_hdl, err, errbuf));
|
return (zfs_standard_error(zhp->zfs_hdl, err2, errbuf));
|
||||||
}
|
}
|
||||||
|
|
||||||
return (err || sdd.err);
|
return (err || sdd.err);
|
||||||
|
Loading…
Reference in New Issue
Block a user