summaryrefslogtreecommitdiff
path: root/builtin/commit-graph.c
diff options
context:
space:
mode:
authorDerrick Stolee <dstolee@microsoft.com>2018-06-27 09:24:27 -0400
committerJunio C Hamano <gitster@pobox.com>2018-06-27 10:27:04 -0700
commit883e5c7fe90aa2ef9f6efd1ef476ca281d09e79b (patch)
tree98bb1600b332b3ae8566574b96e8b49a42eedd93 /builtin/commit-graph.c
parent55abcb417bb5b769e2aacb92a1f05c6c58127cae (diff)
downloadgit-883e5c7fe90aa2ef9f6efd1ef476ca281d09e79b.tar.gz
commit-graph: UNLEAK before die()
Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit-graph.c')
-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",