Skip to content

Commit ff0eb72

Browse files
rscharfegitster
authored andcommitted
commit-graph: remove unnecessary UNLEAK
When f4dbdfc (commit-graph: clean up leaked memory during write, 2018-10-03) added the UNLEAK, it was right before a call to die_errno(). e103f72 (commit-graph: return with errors during write, 2019-06-12) made it unnecessary, as it was then followed by a free() call for the allocated string. The code moved to write_commit_graph_file() in the meantime and the string pointer is now part of a struct, but the function's only caller still cleans up the allocation. Drop the superfluous UNLEAK. Signed-off-by: René Scharfe <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 94b60ad commit ff0eb72

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

commit-graph.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2055,7 +2055,6 @@ static int write_commit_graph_file(struct write_commit_graph_context *ctx)
20552055
}
20562056

20572057
if (safe_create_leading_directories(ctx->graph_name)) {
2058-
UNLEAK(ctx->graph_name);
20592058
error(_("unable to create leading directories of %s"),
20602059
ctx->graph_name);
20612060
return -1;

0 commit comments

Comments
 (0)