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>
This commit is contained in:
committed by
Junio C Hamano
parent
14da26230a
commit
bb8c43d5cd
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user