diff options
| author | Jeff King <peff@peff.net> | 2024-09-09 19:19:02 -0400 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-09-09 16:26:10 -0700 |
| commit | ec007cde941226ed35434ea6443ad1ba066279cf (patch) | |
| tree | d933774812157ed38b848cbf79807b599604cbb6 /builtin/commit.c | |
| parent | ref-filter: fix leak of %(trailers) "argbuf" (diff) | |
| download | git-ec007cde941226ed35434ea6443ad1ba066279cf.tar.gz git-ec007cde941226ed35434ea6443ad1ba066279cf.zip | |
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 'builtin/commit.c')
0 files changed, 0 insertions, 0 deletions
