commit 0adc7bcc3f16033b549ab06c8a1bd0007bb5a7d9 from: Stefan Sperling date: Sat Jun 29 21:28:23 2019 UTC call got_object_id_queue_free() instead of implementing it inline commit - dd88155e484f5bbae1af4e3c8d020cabc2e647ab commit + 0adc7bcc3f16033b549ab06c8a1bd0007bb5a7d9 blob - f002e06327aacda24b3be226db6d6e62b6370188 blob + d9d0f1136dd172399769d72beae81c13efd026e3 --- lib/pack.c +++ lib/pack.c @@ -496,14 +496,8 @@ got_packidx_match_id_str_prefix(struct got_object_id_q oid = &packidx->hdr.sorted_ids[++i]; } - if (err) { - while (!SIMPLEQ_EMPTY(matched_ids)) { - struct got_object_qid *qid; - qid = SIMPLEQ_FIRST(matched_ids); - SIMPLEQ_REMOVE_HEAD(matched_ids, entry); - got_object_qid_free(qid); - } - } + if (err) + got_object_id_queue_free(matched_ids); return err; }