summaryrefslogtreecommitdiffstats
path: root/repository.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2017-09-05 15:04:51 +0200
committerJunio C Hamano <gitster@pobox.com>2017-09-06 11:06:26 +0200
commitafbb8838b7d4d1887da1e1871f8e9ccd01ae1138 (patch)
treee6a3f3db9bcc1b2508b9484a8d32c8684cc29374 /repository.c
parentreset: make tree counting less confusing (diff)
downloadgit-afbb8838b7d4d1887da1e1871f8e9ccd01ae1138.tar.xz
git-afbb8838b7d4d1887da1e1871f8e9ccd01ae1138.zip
reset: free allocated tree buffers
We read the tree objects with fill_tree_descriptor(), but never actually free the resulting buffers, causing a memory leak. This isn't a huge deal because we call this code at most twice per program invocation. But it does potentially double our heap usage if you have large root trees. Let's free the trees before returning. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'repository.c')
0 files changed, 0 insertions, 0 deletions