mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
copy: fix an unlikely memory leak when a fiemap copy fails
* src/copy.c (extent_copy): Free the extents array when sparse_copy() fails.
This commit is contained in:
1 parent
a71537366e
commit
8b2bedadb5
1 file changed
+1
-1
+1
-1
@@ -415,7 +415,7 @@ extent_copy (int src_fd, int dest_fd, char *buf, size_t buf_size,
|
||||
sparse_mode == SPARSE_ALWAYS,
|
||||
src_name, dst_name, ext_len, &n_read,
|
||||
&wrote_hole_at_eof))
|
||||
return false;
|
||||
goto fail;
|
||||
|
||||
dest_pos = ext_start + n_read;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user