Commit ec007cd
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>1 parent f6ba781 commit ec007cd
1 file changed
Lines changed: 6 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
236 | | - | |
| 236 | + | |
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
| |||
693 | 693 | | |
694 | 694 | | |
695 | 695 | | |
696 | | - | |
| 696 | + | |
697 | 697 | | |
698 | 698 | | |
699 | 699 | | |
| |||
702 | 702 | | |
703 | 703 | | |
704 | 704 | | |
705 | | - | |
| 705 | + | |
706 | 706 | | |
707 | 707 | | |
708 | 708 | | |
709 | 709 | | |
710 | 710 | | |
711 | | - | |
712 | 711 | | |
713 | 712 | | |
714 | 713 | | |
| |||
1941 | 1940 | | |
1942 | 1941 | | |
1943 | 1942 | | |
1944 | | - | |
| 1943 | + | |
1945 | 1944 | | |
1946 | 1945 | | |
1947 | 1946 | | |
| |||
3004 | 3003 | | |
3005 | 3004 | | |
3006 | 3005 | | |
| 3006 | + | |
| 3007 | + | |
3007 | 3008 | | |
3008 | 3009 | | |
3009 | 3010 | | |
| |||
0 commit comments