Merge branch 'ly/commit-graph-fill-oids-leakfix'

Leakfix.

* ly/commit-graph-fill-oids-leakfix:
  commit-graph: fix memory leak when `fill_oids_from_packs()` fails
maint
Junio C Hamano 2025-05-27 13:59:07 -07:00
commit b6fa7fbcd1
1 changed files with 2 additions and 0 deletions

View File

@ -1929,6 +1929,8 @@ static int fill_oids_from_packs(struct write_commit_graph_context *ctx,
}
if (open_pack_index(p)) {
ret = error(_("error opening index for %s"), packname.buf);
close_pack(p);
free(p);
goto cleanup;
}
for_each_object_in_pack(p, add_packed_commits, ctx,