From ff0eb72fb62919b744dba2c41f09e01d494971df Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ren=C3=A9=20Scharfe?= Date: Sun, 22 Sep 2024 15:40:42 +0200 Subject: [PATCH] commit-graph: remove unnecessary UNLEAK MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When f4dbdfc4d5 (commit-graph: clean up leaked memory during write, 2018-10-03) added the UNLEAK, it was right before a call to die_errno(). e103f7276f (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 Signed-off-by: Junio C Hamano --- commit-graph.c | 1 - 1 file changed, 1 deletion(-) diff --git a/commit-graph.c b/commit-graph.c index aa6e08eb39..5bd89c0acd 100644 --- a/commit-graph.c +++ b/commit-graph.c @@ -2055,7 +2055,6 @@ static int write_commit_graph_file(struct write_commit_graph_context *ctx) } if (safe_create_leading_directories(ctx->graph_name)) { - UNLEAK(ctx->graph_name); error(_("unable to create leading directories of %s"), ctx->graph_name); return -1; -- 2.39.5