mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-23 13:05:27 +00:00
virNetServerPreExecRestart: Check for retval of virJSONValueNewArray()
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
parent
0cf3bb805c
commit
aa308f7ffc
@ -629,7 +629,9 @@ virJSONValuePtr virNetServerPreExecRestart(virNetServerPtr srv)
|
||||
goto error;
|
||||
}
|
||||
|
||||
services = virJSONValueNewArray();
|
||||
if (!(services = virJSONValueNewArray()))
|
||||
goto error;
|
||||
|
||||
if (virJSONValueObjectAppend(object, "services", services) < 0) {
|
||||
virJSONValueFree(services);
|
||||
goto error;
|
||||
@ -646,7 +648,9 @@ virJSONValuePtr virNetServerPreExecRestart(virNetServerPtr srv)
|
||||
}
|
||||
}
|
||||
|
||||
clients = virJSONValueNewArray();
|
||||
if (!(clients = virJSONValueNewArray()))
|
||||
goto error;
|
||||
|
||||
if (virJSONValueObjectAppend(object, "clients", clients) < 0) {
|
||||
virJSONValueFree(clients);
|
||||
goto error;
|
||||
|
Loading…
x
Reference in New Issue
Block a user