aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-08-07 14:07:18 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-08-07 14:07:18 +0200
commitfd98948e840f6e67cd2d7c72f57d2fd80ed9a418 (patch)
tree84456a686a54e5d3a0bfaba6fc7ff4d746528145
parent9df4edbd5df8ff1e557f9e22b2612c06a6b1d505 (diff)
Fix resource leak in error branch for fscompare compare_files
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
-rw-r--r--difftool/compare_file.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/difftool/compare_file.c b/difftool/compare_file.c
index c424220..c427f38 100644
--- a/difftool/compare_file.c
+++ b/difftool/compare_file.c
@@ -55,6 +55,7 @@ int compare_files(file_info_t *a, file_info_t *b, const char *path)
if (bptr == MAP_FAILED) {
fprintf(stderr, "mmap %s/%s: %s\n", second_path, path,
strerror(errno));
+ munmap(aptr, diff);
goto fail_bfd;
}