commit 2234939fb43098f678d4891f7ba1fb4094ad56f3 from: Mark Jamsek date: Tue Dec 19 12:16:55 2023 UTC plug object id queue leak when iterating pack index files We need to free the matched object id queue on each pack index iteration--not only when the objects/pack dir modification time has changed--otherwise the ids are leaked when we reinitialise the queue in got_packidx_match_id_str_prefix(). tweaked by + ok op@ commit - 9fe0899b90726c84f4aa0837580eccef58e48631 commit + 2234939fb43098f678d4891f7ba1fb4094ad56f3 blob - a81092fd0836c5d97b58ad7ed9f24312f5c27691 blob + 3796a21b865387c428d693bce9a05fd8de6779fa --- lib/repository.c +++ lib/repository.c @@ -1809,7 +1809,6 @@ retry: "modifications"); goto done; } - got_object_id_queue_free(&matched_ids); goto retry; } @@ -1820,6 +1819,8 @@ retry: if (err) break; + got_object_id_queue_free(&matched_ids); + err = got_packidx_match_id_str_prefix(&matched_ids, packidx, id_str_prefix); if (err) {