summaryrefslogtreecommitdiffstats
path: root/commit-graph.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-09-21 23:23:14 +0200
committerJunio C Hamano <gitster@pobox.com>2022-09-21 23:23:14 +0200
commit3239100b5a0135fb5d50a023fef7fdd7325f101a (patch)
tree02444fc62ac27a22ca4afb41a441451fca1e8942 /commit-graph.c
parentMerge branch 'ec/reftable-pass-pq-entry-by-reference' (diff)
parentcommit-graph: Fix missing closedir in expire_commit_graphs (diff)
downloadgit-3239100b5a0135fb5d50a023fef7fdd7325f101a.tar.xz
git-3239100b5a0135fb5d50a023fef7fdd7325f101a.zip
Merge branch 'ml/commit-graph-expire-dir-leak-fix'
A result from opendir() was leaking in the commit-graph expiration codepath, which has been plugged. * ml/commit-graph-expire-dir-leak-fix: commit-graph: Fix missing closedir in expire_commit_graphs
Diffstat (limited to 'commit-graph.c')
-rw-r--r--commit-graph.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/commit-graph.c b/commit-graph.c
index 06f7d9e0b6..a7d8755932 100644
--- a/commit-graph.c
+++ b/commit-graph.c
@@ -2265,6 +2265,8 @@ static void expire_commit_graphs(struct write_commit_graph_context *ctx)
}
out:
+ if(dir)
+ closedir(dir);
strbuf_release(&path);
}