On Wed, Apr 08, 2026 at 03:24:56PM +0000, Egor Shestakov wrote:
> Subject: [PATCH] MINOR: tools: memvprintf(): remove <out> check that always 
> true
> memvprintf() exits early if the <out> is NULL, so the further NULL check is
> redundant.
> 
> No backport needed.
> ---
>  src/tools.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/src/tools.c b/src/tools.c
> index 49398ae3d..12481ce1e 100644
> --- a/src/tools.c
> +++ b/src/tools.c
> @@ -4678,10 +4678,8 @@ char *memvprintf(char **out, const char *format, 
> va_list orig_args)
>               ha_free(&ret);
>       }
>  
> -     if (out) {
> -             free(*out);
> -             *out = ret;
> -     }
> +     free(*out);
> +     *out = ret;
>  
>       return ret;
>  }

Thanks Egor, I just merged it!

-- 
William Lallemand


Reply via email to