diff options
author | Patrick Steinhardt <ps@pks.im> | 2024-06-11 11:19:26 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-06-11 22:15:05 +0200 |
commit | bb8c43d5cd9648f868e11e462392a38a43354692 (patch) | |
tree | 539202886f12a697feab3629baeab2bb634910b7 /notes-utils.c | |
parent | parse-options: fix leaks for users of OPT_FILENAME (diff) | |
download | git-bb8c43d5cd9648f868e11e462392a38a43354692.tar.xz git-bb8c43d5cd9648f868e11e462392a38a43354692.zip |
notes-utils: free note trees when releasing copied notes
While we clear most of the members of `struct notes_rewrite_cfg` in
`finish_copy_notes_for_rewrite()`, we do not clear the notes tree. Fix
this to plug this memory leak.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'notes-utils.c')
-rw-r--r-- | notes-utils.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/notes-utils.c b/notes-utils.c index e33aa86c4b..671d1969b1 100644 --- a/notes-utils.c +++ b/notes-utils.c @@ -187,6 +187,7 @@ void finish_copy_notes_for_rewrite(struct repository *r, for (i = 0; c->trees[i]; i++) { commit_notes(r, c->trees[i], msg); free_notes(c->trees[i]); + free(c->trees[i]); } free(c->trees); free(c); |