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(a)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(a)redhat.com>
John