From fd98948e840f6e67cd2d7c72f57d2fd80ed9a418 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Wed, 7 Aug 2019 14:07:18 +0200 Subject: Fix resource leak in error branch for fscompare compare_files Signed-off-by: David Oberhollenzer --- difftool/compare_file.c | 1 + 1 file changed, 1 insertion(+) 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; } -- cgit v1.2.3