[PATCH 1/1] git: update to v2.56.0
John Keeping
john at keeping.me.uk
Mon Sep 28 23:16:26 UTC 2026
Hi Christian,
On Mon, Sep 28, 2026 at 08:36:43PM +0200, Christian Hesse wrote:
> diff --git a/ui-blob.c b/ui-blob.c
> index bc91656..5158de5 100644
> --- a/ui-blob.c
> +++ b/ui-blob.c
> @@ -63,7 +63,7 @@ int cgit_ref_path_exists(const char *path, const char *ref, int file_only)
> &paths, walk_tree, &walk_tree_ctx);
>
> done:
> - free(path_items.match);
> + free((void *)path_items.match);
> return walk_tree_ctx.found_path;
> }
Can we remove the xstrdup() at the start of the function and the free()
here?
These were added in commit 3d33b46 ("git: update to v2.13.4") with the
comment "... allocate the match string to avoid needing to cast away
const".
Now that item.match is const char*, we can use "path" directly.
Kind regards,
John
More information about the CGit
mailing list