Commit 58c811c51491d5fcdd876688e147ce6b96f755c0

Stefan Sperling 2018-07-13T10:40:56

remove a wrong free() in got_blame()

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/lib/blame.c b/lib/blame.c
index 0b6ffc0..bcd2b1e 100644
--- a/lib/blame.c
+++ b/lib/blame.c
@@ -427,7 +427,7 @@ got_blame(const char *path, struct got_object_id *start_commit_id,
 		}
 
 		err = got_object_id_str(&id_str, id);
-		free(id);
+		/* Do not free id; It points into blame->lines. */
 		if (err) {
 			free(line);
 			break;