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>
Miaoqian Lin committed
Sep 19, 2022 at 18:14 UTC
12f1ae53243d3ff06a956da1846dde6f32498342
1 file changed
+2
commit-graph.c
+2
@@ -2269,6 +2269,8 @@ static void expire_commit_graphs(struct write_commit_graph_context *ctx)
2269
}
2270
2271
out:
2272
+ if(dir)
2273
+ closedir(dir);
2274
strbuf_release(&path);
2275
}
2276