Commit fa94875295bbd7a4afa0f7724e77dcff8cd3adab

Edward Thomson 2017-06-21T13:08:45

Merge pull request #4277 from pks-t/pks/merge-coverity-fix merge: fix potential free of uninitialized memory

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/merge.c b/src/merge.c
index 5d69d9b..e6fa7dc 100644
--- a/src/merge.c
+++ b/src/merge.c
@@ -1165,7 +1165,7 @@ static int merge_diff_mark_similarity_exact(
 {
 	size_t i, j;
 	git_merge_diff *conflict_src, *conflict_tgt;
-	git_oidmap *ours_deletes_by_oid, *theirs_deletes_by_oid;
+	git_oidmap *ours_deletes_by_oid = NULL, *theirs_deletes_by_oid = NULL;
 	int error = 0;
 
 	if (!(ours_deletes_by_oid = git_oidmap_alloc()) ||