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 | Merge branch 'ly/sequencer-rearrange-leakfix' (diff) | |
| parent | commit-graph: fix memory leak when `fill_oids_from_packs()` fails (diff) | |
| download | git-b6fa7fbcd1b6791675c0b36636745e467419a522.tar.gz git-b6fa7fbcd1b6791675c0b36636745e467419a522.zip | |
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, |
