diff options
| author | Patrick Steinhardt <ps@pks.im> | 2024-09-05 12:09:12 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-09-05 08:49:11 -0700 |
| commit | 0d1d22f5a385d05bde40303c17483db2eec499b3 (patch) | |
| tree | 3b6af161c7e9c2ae1b880ec7d585331f0b117d62 /t/unit-tests | |
| parent | b8849e236f7a32d43ab3ba087587a336d69329b0 (diff) | |
object: clear grafts when clearing parsed object pool
We do not clear grafts part of the parsed object pool when clearing the
pool itself, which can lead to memory leaks when a repository is being
cleared.
Fix this by moving `reset_commit_grafts()` into "object.c" and making it
part of the `struct parsed_object_pool` interface such that we can call
it from `parsed_object_pool_clear()`. Adapt `parsed_object_pool_new()`
to take and store a reference to its owning repository, which is needed
by `unparse_commit()`.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/unit-tests')
0 files changed, 0 insertions, 0 deletions
