[libvirt PATCH] util: Avoid null pointer dereference when setting QoS on OVS

Jiri Denemark posted 1 patch 2 years, 5 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/f8ea05fe3190aeda216dcfb55f69983259ab1927.1636052023.git.jdenemar@redhat.com
src/util/virnetdevopenvswitch.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[libvirt PATCH] util: Avoid null pointer dereference when setting QoS on OVS
Posted by Jiri Denemark 2 years, 5 months ago
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
---
 src/util/virnetdevopenvswitch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/virnetdevopenvswitch.c b/src/util/virnetdevopenvswitch.c
index 250726a633..5dab545037 100644
--- a/src/util/virnetdevopenvswitch.c
+++ b/src/util/virnetdevopenvswitch.c
@@ -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 {
-- 
2.33.1

Re: [libvirt PATCH] util: Avoid null pointer dereference when setting QoS on OVS
Posted by Michal Prívozník 2 years, 5 months ago
On 11/4/21 7:53 PM, Jiri Denemark wrote:
> Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
> ---
>  src/util/virnetdevopenvswitch.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>

Michal