mirror of
https://git.proxmox.com/git/libgit2
synced 2025-06-27 21:57:07 +00:00
pack: packfile_free -> git_packfile_free and use it in the indexers
It turns out the indexers have been ignoring the pack's free function and leaking data. Plug that.
This commit is contained in:
parent
0ed7562006
commit
f289f886cb
@ -747,7 +747,7 @@ void git_indexer_stream_free(git_indexer_stream *idx)
|
||||
git_vector_foreach(&idx->deltas, i, delta)
|
||||
git__free(delta);
|
||||
git_vector_free(&idx->deltas);
|
||||
git__free(idx->pack);
|
||||
git_packfile_free(idx->pack);
|
||||
git__free(idx);
|
||||
}
|
||||
|
||||
@ -1059,7 +1059,7 @@ void git_indexer_free(git_indexer *idx)
|
||||
git_vector_foreach(&idx->pack->cache, i, pe)
|
||||
git__free(pe);
|
||||
git_vector_free(&idx->pack->cache);
|
||||
git__free(idx->pack);
|
||||
git_packfile_free(idx->pack);
|
||||
git__free(idx);
|
||||
}
|
||||
|
||||
|
@ -538,7 +538,7 @@ static void pack_backend__free(git_odb_backend *_backend)
|
||||
|
||||
for (i = 0; i < backend->packs.length; ++i) {
|
||||
struct git_pack_file *p = git_vector_get(&backend->packs, i);
|
||||
packfile_free(p);
|
||||
git_packfile_free(p);
|
||||
}
|
||||
|
||||
git_vector_free(&backend->packs);
|
||||
|
@ -794,7 +794,7 @@ static struct git_pack_file *packfile_alloc(size_t extra)
|
||||
}
|
||||
|
||||
|
||||
void packfile_free(struct git_pack_file *p)
|
||||
void git_packfile_free(struct git_pack_file *p)
|
||||
{
|
||||
assert(p);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user