* src/copy.c (copy_reg): Don't return from the function after an
unsuccessful and required preservation of extended attributes.
This resulted in leaking the copy buffer and file descriptors.
* NEWS (Bug fixes): Mention the fix.
The bug was introduced in coreutils-7.1 via commit
0889381c, 2009-01-23,
"cp/mv: add xattr support".
cp --reflink --preserve now preserves attributes when cloning a file.
[bug introduced in coreutils-7.5]
+ cp --preserve=xattr no longer leaks resources on each preservation failure.
+ [bug introduced in coreutils-7.1]
+
dd now returns non-zero status if it encountered a write error while
printing a summary to stderr.
[bug introduced in coreutils-6.11]
if (x->preserve_xattr && ! copy_attr_by_fd (src_name, source_desc,
dst_name, dest_desc, x)
&& x->require_preserve_xattr)
- return false;
+ return_val = false;
if (x->preserve_mode || x->move_mode)
{