diff options
author | Junio C Hamano <gitster@pobox.com> | 2025-05-27 13:59:07 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2025-05-27 13:59:08 -0700 |
commit | b6fa7fbcd1b6791675c0b36636745e467419a522 (patch) | |
tree | 55c0002096f64cafa5767cf78cf7c2898b18f10f /commit-graph.c | |
parent | 6261489cdba61715ee9e0716d7a8a7fc63c53e49 (diff) | |
parent | beccbddb6802c0b56e34bb1d55cecceb093940f4 (diff) |
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
Diffstat (limited to 'commit-graph.c')
-rw-r--r-- | commit-graph.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/commit-graph.c b/commit-graph.c index 4a6e34f8a0..bb77d81861 100644 --- a/commit-graph.c +++ b/commit-graph.c @@ -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, |