Commit 5e9266f9d6904304336b0a80b14ba5676953c9f0

Christian Weisgerber 2020-11-28T18:35:49

fix a typo that triggered "munmap: Invalid argument" in got blame on FreeBSD ok stsp

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/lib/blame.c b/lib/blame.c
index ca38022..c8bf3d3 100644
--- a/lib/blame.c
+++ b/lib/blame.c
@@ -471,7 +471,7 @@ close_file2_and_reuse_file1(struct got_blame *blame)
 		if (munmap(blame->map2, blame->size2) == -1)
 			return got_error_from_errno("munmap");
 		blame->map2 = blame->map1;
-		blame->map2 = NULL;
+		blame->map1 = NULL;
 
 	}
 	blame->size2 = blame->size1;