commit 7438da3b00bb4e411aec9e3153a76273294ec492 from: Mark Jamsek via: Thomas Adam date: Tue Dec 19 17:12:50 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 - ce631d355cc5c9d10e40a7d35b331afba2f3d964 commit + 7438da3b00bb4e411aec9e3153a76273294ec492 blob - a822a547f29848941ba519394517972e4f92d290 blob + d03adb90174241003324f223eadcf82466c3c87b --- lib/repository.c +++ lib/repository.c @@ -1806,7 +1806,6 @@ retry: "modifications"); goto done; } - got_object_id_queue_free(&matched_ids); goto retry; } @@ -1817,6 +1816,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) {