summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiaoqian Lin <linmq006@gmail.com>2022-09-19 14:14:40 (GMT)
committerJunio C Hamano <gitster@pobox.com>2022-09-19 17:42:38 (GMT)
commit12f1ae53243d3ff06a956da1846dde6f32498342 (patch)
treef2557eaed1640aeb998d810752cb69f170cd8803
parentfd59c5bdeeb50f18e86f36cbf7a0b82554621690 (diff)
downloadgit-12f1ae53243d3ff06a956da1846dde6f32498342.zip
git-12f1ae53243d3ff06a956da1846dde6f32498342.tar.gz
git-12f1ae53243d3ff06a956da1846dde6f32498342.tar.bz2
commit-graph: Fix missing closedir in expire_commit_graphs
The function calls opendir() but missing the corresponding closedir() before exit the function. Add missing closedir() to fix it. Signed-off-by: Miaoqian Lin <linmq006@gmail.com> Reviewed-by: Derrick Stolee <derrickstolee@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--commit-graph.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/commit-graph.c b/commit-graph.c
index 2b52818..0d44cd0 100644
--- a/commit-graph.c
+++ b/commit-graph.c
@@ -2269,6 +2269,8 @@ static void expire_commit_graphs(struct write_commit_graph_context *ctx)
}
out:
+ if(dir)
+ closedir(dir);
strbuf_release(&path);
}