diff options
| author | Patrick Steinhardt <ps@pks.im> | 2024-08-22 11:17:13 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-08-22 09:18:03 -0700 |
| commit | 643c6f576cb7b0a7e2345cd4f8e8d7468fefc483 (patch) | |
| tree | fe1007ecd39a7ead4c4dd0352f61c9cf6b37803c /convert.c | |
| parent | e5530f9c5c011125420bb6416f9ba519082e98b6 (diff) | |
| download | git-643c6f576cb7b0a7e2345cd4f8e8d7468fefc483.tar.xz | |
convert: fix leaks when resetting attributes
When resetting parsed gitattributes, we free the list of convert drivers
parsed from the config. We only free some of the drivers' fields though
and thus have memory leaks.
Fix this by freeing all allocated convert driver fields to plug these
memory leaks.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'convert.c')
| -rw-r--r-- | convert.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1371,6 +1371,9 @@ void reset_parsed_attributes(void) for (drv = user_convert; drv; drv = next) { next = drv->next; free((void *)drv->name); + free((void *)drv->smudge); + free((void *)drv->clean); + free((void *)drv->process); free(drv); } user_convert = NULL; |
