Merge pull request #3421 from ethomson/mempack-fix

Mempack fix
This commit is contained in:
Carlos Martín Nieto 2015-09-12 04:00:34 +02:00
commit 049dbf42f5
2 changed files with 8 additions and 2 deletions

View File

@ -154,12 +154,16 @@ void git_mempack_reset(git_odb_backend *_backend)
});
git_array_clear(db->commits);
git_oidmap_clear(db->objects);
}
static void impl__free(git_odb_backend *_backend)
{
git_mempack_reset(_backend);
git__free(_backend);
struct memory_packer_db *db = (struct memory_packer_db *)_backend;
git_oidmap_free(db->objects);
git__free(db);
}
int git_mempack_new(git_odb_backend **out)

View File

@ -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_clear(h) kh_clear(oid, h)
#endif