Re: [libvirt PATCH 3/8] remote: use g_new0 instead of VIR_ALLOC

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

 




On 10/8/20 8:12 AM, Ján Tomko wrote:
> Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
> ---
>  src/remote/remote_daemon_config.c   |   3 +-
>  src/remote/remote_daemon_dispatch.c | 225 ++++++++++------------------
>  src/remote/remote_daemon_stream.c   |   6 +-
>  src/remote/remote_driver.c          | 102 ++++---------
>  4 files changed, 108 insertions(+), 228 deletions(-)
> 

[...]

> diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
> index 6e0c04f168..49769ac04d 100644
> --- a/src/remote/remote_driver.c
> +++ b/src/remote/remote_driver.c

[...]

> @@ -7676,14 +7635,13 @@ remoteDomainGetFSInfo(virDomainPtr dom,
>              goto cleanup;
>          }
>  
> -        if (VIR_ALLOC_N(info_ret, ret.info.info_len) < 0)
> +        info_ret = g_new0(virDomainFSInfoPtr, ret.info.info_len);
>              goto cleanup;

^^^^
Coverity notes a simple / trivial cleanup

[...]




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux