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>
This commit is contained in:
Miaoqian Lin 2022-09-19 18:14:40 +04:00 committed by Junio C Hamano
parent fd59c5bdee
commit 12f1ae5324

View File

@ -2269,6 +2269,8 @@ static void expire_commit_graphs(struct write_commit_graph_context *ctx)
}
out:
if(dir)
closedir(dir);
strbuf_release(&path);
}