Commit 049dbf42 by Carlos Martín Nieto

Merge pull request #3421 from ethomson/mempack-fix

Mempack fix
parents 6c21211c 220d6f8a
...@@ -154,12 +154,16 @@ void git_mempack_reset(git_odb_backend *_backend) ...@@ -154,12 +154,16 @@ void git_mempack_reset(git_odb_backend *_backend)
}); });
git_array_clear(db->commits); git_array_clear(db->commits);
git_oidmap_clear(db->objects);
} }
static void impl__free(git_odb_backend *_backend) static void impl__free(git_odb_backend *_backend)
{ {
git_mempack_reset(_backend); struct memory_packer_db *db = (struct memory_packer_db *)_backend;
git__free(_backend);
git_oidmap_free(db->objects);
git__free(db);
} }
int git_mempack_new(git_odb_backend **out) int git_mempack_new(git_odb_backend **out)
......
...@@ -49,4 +49,6 @@ GIT_INLINE(khint_t) git_oidmap_hash(const git_oid *oid) ...@@ -49,4 +49,6 @@ GIT_INLINE(khint_t) git_oidmap_hash(const git_oid *oid)
#define git_oidmap_size(h) kh_size(h) #define git_oidmap_size(h) kh_size(h)
#define git_oidmap_clear(h) kh_clear(oid, h)
#endif #endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment