From 8b2bedadb565489085e24833da34175e2be7e4cc Mon Sep 17 00:00:00 2001 From: =?utf8?q?P=C3=A1draig=20Brady?=
Date: Tue, 5 Apr 2011 19:16:40 +0100 Subject: [PATCH] copy: fix an unlikely memory leak when a fiemap copy fails * src/copy.c (extent_copy): Free the extents array when sparse_copy() fails. --- src/copy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/copy.c b/src/copy.c index d479b9c..9b53127 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; } -- 2.7.4