summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Derrick Stolee <dstolee@microsoft.com>2018-06-27 09:24:27 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-06-27 10:27:04 -0700
commit883e5c7fe90aa2ef9f6efd1ef476ca281d09e79b (patch)
tree98bb1600b332b3ae8566574b96e8b49a42eedd93
parentt5318-commit-graph.sh: use core.commitGraph (diff)
downloadtgif-883e5c7fe90aa2ef9f6efd1ef476ca281d09e79b.tar.xz
commit-graph: UNLEAK before die()
Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--builtin/commit-graph.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/builtin/commit-graph.c b/builtin/commit-graph.c
index 37420ae0fd..f0875b8bf3 100644
--- a/builtin/commit-graph.c
+++ b/builtin/commit-graph.c
@@ -51,8 +51,11 @@ static int graph_read(int argc, const char **argv)
graph_name = get_commit_graph_filename(opts.obj_dir);
graph = load_commit_graph_one(graph_name);
- if (!graph)
+ if (!graph) {
+ UNLEAK(graph_name);
die("graph file %s does not exist", graph_name);
+ }
+
FREE_AND_NULL(graph_name);
printf("header: %08x %d %d %d %d\n",