diff options
author | Patrick Steinhardt <ps@pks.im> | 2015-12-01 14:19:29 +0100 |
---|---|---|
committer | Patrick Steinhardt <ps@pks.im> | 2015-12-01 14:25:15 +0100 |
commit | 9487585ddc5d7cbb8b9d085e030a01ff805bc41b (patch) | |
tree | 39691fcf493c6571fdf30a02610c02c1a837ab45 /tests/diff/diffiter.c | |
parent | 337b2b08f46ea77d61fa66657ad62d8702bc233a (diff) | |
download | libgit2-9487585ddc5d7cbb8b9d085e030a01ff805bc41b.tar.gz |
tree: mark cloned tree entries as un-pooled
When duplicating a `struct git_tree_entry` with
`git_tree_entry_dup` the resulting structure is not allocated
inside a memory pool. As we do a 1:1 copy of the original struct,
though, we also copy the `pooled` field, which is set to `true`
for pooled entries. This results in a huge memory leak as we
never free tree entries that were duplicated from a pooled
tree entry.
Fix this by marking the newly duplicated entry as un-pooled.
Diffstat (limited to 'tests/diff/diffiter.c')
0 files changed, 0 insertions, 0 deletions