summaryrefslogtreecommitdiffstats
path: root/list-objects.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-04-11 00:20:18 +0200
committerJunio C Hamano <gitster@pobox.com>2009-04-12 23:30:31 +0200
commit213152688c85a0e4d591abc1c10b7c279ffefb99 (patch)
tree08262e8147511acd423900e70cbf381454578c97 /list-objects.c
parentprocess_{tree,blob}: Remove useless xstrdup calls (diff)
downloadgit-213152688c85a0e4d591abc1c10b7c279ffefb99.tar.xz
git-213152688c85a0e4d591abc1c10b7c279ffefb99.zip
process_{tree,blob}: Remove useless xstrdup calls
On Wed, 8 Apr 2009, Björn Steinbrink wrote: > > The name of the processed object was duplicated for passing it to > add_object(), but that already calls path_name, which allocates a new > string anyway. So the memory allocated by the xstrdup calls just went > nowhere, leaking memory. Ack, ack. There's another easy 5% or so for the built-in object walker: once we've created the hash from the name, the name isn't interesting any more, and so something trivial like this can help a bit. Does it matter? Probably not on its own. But a few more memory saving tricks and it might all make a difference. Linus Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'list-objects.c')
0 files changed, 0 insertions, 0 deletions