Commit 8e177b2bb8cacc3ca9e1edd301a8aa1132f300af

Bryan Woods 2015-09-10T14:44:52

Fixing dangling pointers in git_mempack_reset git_mempack_reset was leaving free'd pointers in the oidmap.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/src/odb_mempack.c b/src/odb_mempack.c
index 3435527..538dfc5 100644
--- a/src/odb_mempack.c
+++ b/src/odb_mempack.c
@@ -154,6 +154,9 @@ void git_mempack_reset(git_odb_backend *_backend)
 	});
 
 	git_array_clear(db->commits);
+
+	git_oidmap_free(db->objects);
+	db->objects = git_oidmap_alloc();
 }
 
 static void impl__free(git_odb_backend *_backend)