util: Avoid null pointer dereference when setting QoS on OVS

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Jiri Denemark 2021-10-29 11:13:33 +02:00
parent a5bbe1a8b6
commit 185b06ba35

View File

@ -759,7 +759,7 @@ virNetDevOpenvswitchInterfaceSetQos(const char *ifname,
}
virCommandAddArgList(cmd, vmid_ex_id, ifname_ex_id, NULL);
if (virCommandRun(cmd, NULL) < 0) {
if (*queue_uuid) {
if (queue_uuid && *queue_uuid) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Unable to set queue configuration on port %s"), ifname);
} else {