summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2011-04-05 19:16:40 +0100
committerPádraig Brady <P@draigBrady.com>2011-04-06 23:08:54 +0100
commit8b2bedadb565489085e24833da34175e2be7e4cc (patch)
tree1e8d4453440d01d7ee657494f15c7e954f8aecd9 /src
parenta71537366ea913fe62a71392993a570d95b473ab (diff)
downloadcoreutils-8b2bedadb565489085e24833da34175e2be7e4cc.tar.xz
copy: fix an unlikely memory leak when a fiemap copy fails
* src/copy.c (extent_copy): Free the extents array when sparse_copy() fails.
Diffstat (limited to 'src')
-rw-r--r--src/copy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/copy.c b/src/copy.c
index d479b9c8f..9b53127c4 100644
--- a/src/copy.c
+++ b/src/copy.c
@@ -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;
}