mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-30 22:24:56 +00:00
Removing memory leak in mempack's free
It calls git_mempack_reset which reallocates the object array. git_oidmap_free is now called on it explicitly.
This commit is contained in:
parent
8e177b2bb8
commit
707f65372b
@ -161,8 +161,12 @@ void git_mempack_reset(git_odb_backend *_backend)
|
|||||||
|
|
||||||
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_mempack_reset(db);
|
||||||
|
git_oidmap_free(db->objects);
|
||||||
|
|
||||||
|
git__free(db);
|
||||||
}
|
}
|
||||||
|
|
||||||
int git_mempack_new(git_odb_backend **out)
|
int git_mempack_new(git_odb_backend **out)
|
||||||
|
Loading…
Reference in New Issue
Block a user