qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] cutils: replace strdup with g_strdup


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH] cutils: replace strdup with g_strdup
Date: Mon, 2 Nov 2020 19:57:29 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1

On 11/2/20 7:22 PM, Paolo Bonzini wrote:
> Memory returned by get_relocated_path must be freed with
> free or g_free depending on the path that the function
> took; Coverity takes exception to this practice.  The
> fix lets caller use g_free as is standard in QEMU.
> 
> While at it, mention the requirements on the caller in
> the doc comment.
> 
> Suggested-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  include/qemu/cutils.h | 1 +
>  util/cutils.c         | 2 +-
>  2 files changed, 2 insertions(+), 1 deletion(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]