[libvirt] [PATCH v5 4/4] qemu: unlink the error report from VIR_STRDUP.

John Ferlan jferlan at redhat.com
Wed Sep 5 17:16:27 UTC 2018



On 09/05/2018 12:20 AM, Julio Faracco wrote:
> The function to retrieve the file system info using QEMU-GA is using
> some conditionals to retrieve the info. This is wrong because the error
> of some conditionals will be raised if VIR_STRDUP return errors and not
> if some problem occurred with JSON.
> 
> Signed-off-by: Julio Faracco <jcfaracco at gmail.com>
> ---
>  src/qemu/qemu_agent.c | 19 +++++++++++++------
>  1 file changed, 13 insertions(+), 6 deletions(-)
> 
> diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c
> index ac728becef..36dc18d72f 100644
> --- a/src/qemu/qemu_agent.c
> +++ b/src/qemu/qemu_agent.c
> @@ -1836,6 +1836,7 @@ qemuAgentGetFSInfo(qemuAgentPtr mon, virDomainFSInfoPtr **info,
>      virJSONValuePtr data;
>      virDomainFSInfoPtr *info_ret = NULL;
>      virPCIDeviceAddress pci_address;
> +    const char *result = NULL;

This can move inside the for loop...

I can move before pushing...

Reviewed-by: John Ferlan <jferlan at redhat.com>

John




More information about the libvir-list mailing list