]> git.99rst.org Git - git.git/commit
notes: fix memory leak when pruning notes
authorPatrick Steinhardt <redacted>
Tue, 11 Jun 2024 09:19:50 +0000 (11:19 +0200)
committerJunio C Hamano <redacted>
Tue, 11 Jun 2024 20:15:05 +0000 (13:15 -0700)
commitf644dc84949bcc6d6d06274a30feb4b366ae68de
tree575d800735a9687ed89c1e0f7c4c33a91382c0ce
parent97485374377fa62fdd36f4b707e2fcd8f1a7c6c3
notes: fix memory leak when pruning notes

In `prune_notes()` we first store the notes that are to be deleted in a
local list, and then iterate through that list to delete those notes one
by one. We never free the list though and thus leak its memory. Fix
this.

Signed-off-by: Patrick Steinhardt <redacted>
Signed-off-by: Junio C Hamano <redacted>
notes.c
t/t3306-notes-prune.sh
git clone https://git.99rst.org/PROJECT