Skip to content

Commit

Permalink
Merge branch 'ah/commit-graph-leakplug'
Browse files Browse the repository at this point in the history
Plug a minor memory leak.

* ah/commit-graph-leakplug:
  commit-graph: avoid leaking topo_levels slab in write_commit_graph()
  • Loading branch information
gitster committed Feb 26, 2021
2 parents 6eea44c + bf4bb9f commit 3c8e6dd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions commit-graph.c
Original file line number Diff line number Diff line change
Expand Up @@ -2471,6 +2471,7 @@ int write_commit_graph(struct object_directory *odb,
free(ctx->graph_name);
free(ctx->commits.list);
oid_array_clear(&ctx->oids);
clear_topo_level_slab(&topo_levels);

if (ctx->commit_graph_filenames_after) {
for (i = 0; i < ctx->num_commit_graphs_after; i++) {
Expand Down

0 comments on commit 3c8e6dd

Please sign in to comment.