diff options
author | Pádraig Brady <P@draigBrady.com> | 2011-04-05 19:16:40 +0100 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2011-04-06 23:08:54 +0100 |
commit | 8b2bedadb565489085e24833da34175e2be7e4cc (patch) | |
tree | 1e8d4453440d01d7ee657494f15c7e954f8aecd9 /src | |
parent | a71537366ea913fe62a71392993a570d95b473ab (diff) | |
download | coreutils-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.c | 2 |
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; } |