commit-graph: use free_commit_graph() instead of UNLEAK()
In0bfb48e672
(builtin/commit-graph.c: UNLEAK variables, 2018-10-03) this was made to UNLEAK(), but we can just as easily invoke the free_commit_graph() function added inc3756d5b7f
(commit-graph: add free_commit_graph, 2018-07-11) instead. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
53537c6c17
commit
e8ed0a8ac5
@ -67,6 +67,7 @@ static int graph_verify(int argc, const char **argv, const char *prefix)
|
|||||||
int fd;
|
int fd;
|
||||||
struct stat st;
|
struct stat st;
|
||||||
int flags = 0;
|
int flags = 0;
|
||||||
|
int ret;
|
||||||
|
|
||||||
static struct option builtin_commit_graph_verify_options[] = {
|
static struct option builtin_commit_graph_verify_options[] = {
|
||||||
OPT_BOOL(0, "shallow", &opts.shallow,
|
OPT_BOOL(0, "shallow", &opts.shallow,
|
||||||
@ -111,8 +112,9 @@ static int graph_verify(int argc, const char **argv, const char *prefix)
|
|||||||
if (!graph)
|
if (!graph)
|
||||||
return !!open_ok;
|
return !!open_ok;
|
||||||
|
|
||||||
UNLEAK(graph);
|
ret = verify_commit_graph(the_repository, graph, flags);
|
||||||
return verify_commit_graph(the_repository, graph, flags);
|
free_commit_graph(graph);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern int read_replace_refs;
|
extern int read_replace_refs;
|
||||||
|
Reference in New Issue
Block a user