about summary refs log tree commit diff
path: root/tests/setup.sh
diff options
context:
space:
mode:
authorLukas Fleischer <cgit@cryptocrack.de>2013-03-04 13:25:34 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2013-03-04 19:55:21 -0500
commitfab385ef5ca516dcda79df87eb926eccdda64a54 (patch)
tree841673c92d319fac0a7d4b857a88dfcf2c9084e1 /tests/setup.sh
parentFree reflists after usage (diff)
downloadcgit-pink-fab385ef5ca516dcda79df87eb926eccdda64a54.tar.gz
cgit-pink-fab385ef5ca516dcda79df87eb926eccdda64a54.zip
print_tag_downloads(): Free ref variable
Make sure the ref variable is freed if we build a
"$basename-$version"-style ref.

This fixes following memory leak seen with "PATH_INFO=/cgit/refs/":

    ==8784== 323 bytes in 29 blocks are definitely lost in loss record 41 of 53
    ==8784==    at 0x4C2C04B: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==8784==    by 0x56F2DF1: strdup (in /usr/lib/libc-2.17.so)
    ==8784==    by 0x46CA28: xstrdup (wrapper.c:35)
    ==8784==    by 0x410DA6: print_tag_downloads (ui-refs.c:115)
    ==8784==    by 0x410F02: print_tag (ui-refs.c:141)
    ==8784==    by 0x41128B: cgit_print_tags (ui-refs.c:230)
    ==8784==    by 0x41134D: cgit_print_refs (ui-refs.c:250)
    ==8784==    by 0x407C85: refs_fn (cmd.c:105)
    ==8784==    by 0x405DDF: process_request (cgit.c:566)
    ==8784==    by 0x407490: cache_process (cache.c:322)
    ==8784==    by 0x406C18: main (cgit.c:864)

Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de>
Diffstat (limited to 'tests/setup.sh')
0 files changed, 0 insertions, 0 deletions
c/commit/2017/src/bin/day08.rs?id=7120a42a45a1091b8f87041e4b0fc03d678af4fa&follow=1'>Day 8June McEnroe 2020-11-22Day 7, part 2June McEnroe I don't even know what this is. Don't look at it. 2020-11-22Day 7June McEnroe 2020-11-22Day 6, part 2June McEnroe 2020-11-22Day 6June McEnroe 2020-11-22Day 5, part 2June McEnroe 2020-11-22Day 5June McEnroe 2020-11-22Day 4, part 2June McEnroe That ugly sort map though. 2020-11-22Day 4June McEnroe 2020-11-22Day 3, part 2June McEnroe I am super surprised that worked on the first try. 2020-11-22Day 3, clean upJune McEnroe 2020-11-22Day 3June McEnroe This is fucking awful and I'm angry. 2020-11-22Day 2, part 2June McEnroe 2020-11-22Day 2June McEnroe 2020-11-22Day 1, part 2June McEnroe 2020-11-22Day 1June McEnroe 2020-11-22Move to 2016 directoryJune McEnroe