mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-03 02:15:23 +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;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
services = virJSONValueNewArray();
|
if (!(services = virJSONValueNewArray()))
|
||||||
|
goto error;
|
||||||
|
|
||||||
if (virJSONValueObjectAppend(object, "services", services) < 0) {
|
if (virJSONValueObjectAppend(object, "services", services) < 0) {
|
||||||
virJSONValueFree(services);
|
virJSONValueFree(services);
|
||||||
goto error;
|
goto error;
|
||||||
@ -646,7 +648,9 @@ virJSONValuePtr virNetServerPreExecRestart(virNetServerPtr srv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
clients = virJSONValueNewArray();
|
if (!(clients = virJSONValueNewArray()))
|
||||||
|
goto error;
|
||||||
|
|
||||||
if (virJSONValueObjectAppend(object, "clients", clients) < 0) {
|
if (virJSONValueObjectAppend(object, "clients", clients) < 0) {
|
||||||
virJSONValueFree(clients);
|
virJSONValueFree(clients);
|
||||||
goto error;
|
goto error;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user