Commit b3c3415d2810c1454003fdbebd5ac20a87733302

Edward Thomson 2018-03-29T14:20:21

Merge pull request #4602 from pks-t/pks/mempack-memleak odb: mempack: fix leaking objects when freeing mempacks

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/src/odb_mempack.c b/src/odb_mempack.c
index a81716e..e351d4d 100644
--- a/src/odb_mempack.c
+++ b/src/odb_mempack.c
@@ -157,6 +157,7 @@ static void impl__free(git_odb_backend *_backend)
 {
 	struct memory_packer_db *db = (struct memory_packer_db *)_backend;
 
+	git_mempack_reset(_backend);
 	git_oidmap_free(db->objects);
 	git__free(db);
 }