It only errors out when presented with a non-array, but we do check
it everywhere else.
Signed-off-by: Ján Tomko <jtomko@redhat.com>
---
src/ch/ch_monitor.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/ch/ch_monitor.c b/src/ch/ch_monitor.c
index 3e49902791..ccd04cfbd1 100644
--- a/src/ch/ch_monitor.c
+++ b/src/ch/ch_monitor.c
@@ -1002,7 +1002,8 @@ virCHMonitorBuildRestoreJson(virDomainDef *vmdef,
return -1;
if (virJSONValueObjectAppendNumberInt(net_json, "num_fds", vmdef->nets[i]->driver.virtio.queues))
return -1;
- virJSONValueArrayAppend(nets, &net_json);
+ if (virJSONValueArrayAppend(nets, &net_json) < 0)
+ return -1;
}
if (virJSONValueObjectAppend(restore_json, "net_fds", &nets))
return -1;
--
2.47.0