]> git.ipfire.org Git - thirdparty/git.git/commitdiff
refs/files: prevent memory leak by freeing packed_ref_store
authorSven Strickroth <email@cs-ware.de>
Mon, 5 Aug 2024 09:53:32 +0000 (09:53 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 5 Aug 2024 15:58:41 +0000 (08:58 -0700)
This complements 64a6dd8ffc (refs: implement removal of ref storages,
2024-06-06).

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Acked-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs/files-backend.c

index e6637811992f0115d1a1522e0b9c72cc41b8ed93..48f6717d9a5d5a68cea70250048c8c04a672e3a6 100644 (file)
@@ -155,6 +155,7 @@ static void files_ref_store_release(struct ref_store *ref_store)
        free_ref_cache(refs->loose);
        free(refs->gitcommondir);
        ref_store_release(refs->packed_ref_store);
+       free(refs->packed_ref_store);
 }
 
 static void files_reflog_path(struct files_ref_store *refs,