From: Derrick Stolee Date: Wed, 27 Jun 2018 13:24:27 +0000 (-0400) Subject: commit-graph: UNLEAK before die() X-Git-Tag: v2.19.0-rc0~110^2~21 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/883e5c7fe90aa2ef9f6efd1ef476ca281d09e79b?ds=inline;hp=--cc commit-graph: UNLEAK before die() Signed-off-by: Derrick Stolee Signed-off-by: Junio C Hamano --- 883e5c7fe90aa2ef9f6efd1ef476ca281d09e79b 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",