summaryrefslogtreecommitdiff
path: root/commit.h
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2024-09-09 19:19:02 -0400
committerJunio C Hamano <gitster@pobox.com>2024-09-09 16:26:10 -0700
commitec007cde941226ed35434ea6443ad1ba066279cf (patch)
treed933774812157ed38b848cbf79807b599604cbb6 /commit.h
parentf6ba781903f778b82e0b2fa11b61fb0403e1bfa5 (diff)
ref-filter: fix leak with %(describe) arguments
When we parse a %(describe) placeholder, we stuff its arguments into a strvec, which is then detached into the used_atom struct. But later, when ref_array_clear() frees the atom, we never free the memory. To solve this, we just need to add the appropriate free() calls. But it's a little awkward, since we have to free each element of the array, in addition to the array itself. Instead, let's store the actual strvec, which lets us do a simple strvec_clear(). This clears up one case that LSan finds in t6300, but there are more. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.h')
0 files changed, 0 insertions, 0 deletions