Skip to content

Commit b6fa7fb

Browse files
committed
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
2 parents 6261489 + beccbdd commit b6fa7fb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

commit-graph.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1929,6 +1929,8 @@ static int fill_oids_from_packs(struct write_commit_graph_context *ctx,
19291929
}
19301930
if (open_pack_index(p)) {
19311931
ret = error(_("error opening index for %s"), packname.buf);
1932+
close_pack(p);
1933+
free(p);
19321934
goto cleanup;
19331935
}
19341936
for_each_object_in_pack(p, add_packed_commits, ctx,

0 commit comments

Comments
 (0)