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:
Pádraig Brady committed 2011-04-06 23:08:54 +01:00
1 parent a71537366e
commit 8b2bedadb5
1 file changed
+1 -1
+1 -1
View File
@@ -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;
}