Merge "Revert "Add img2simg tool that splits a large image into <n> sparse files""
diff --git a/ext4_utils/output_file.c b/ext4_utils/output_file.c
index 1b0b9dc..7b44020 100644
--- a/ext4_utils/output_file.c
+++ b/ext4_utils/output_file.c
@@ -549,6 +549,6 @@
 	}
 
 err:
-	munmap(data, len);
+	munmap(data, len + aligned_diff);
 	close(file_fd);
 }