[libvirt PATCH] util: Fix memory leak when clearing Open vSwitch QoS
Jiri Denemark
jdenemar at redhat.com
Thu Aug 12 16:59:08 UTC 2021
No need to overwrite vmid_ex_id with a pointer to another copy of the
same string when the original is still alive.
Signed-off-by: Jiri Denemark <jdenemar at redhat.com>
---
src/util/virnetdevopenvswitch.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/util/virnetdevopenvswitch.c b/src/util/virnetdevopenvswitch.c
index 7a64a8dbe6..f6a8ed4a31 100644
--- a/src/util/virnetdevopenvswitch.c
+++ b/src/util/virnetdevopenvswitch.c
@@ -824,7 +824,6 @@ virNetDevOpenvswitchInterfaceClearQos(const char *ifname,
/* find queue */
virCommandFree(cmd);
cmd = virNetDevOpenvswitchCreateCmd();
- vmid_ex_id = g_strdup_printf("external-ids:vm-id=\"%s\"", vmuuidstr);
virCommandAddArgList(cmd, "--no-heading", "--columns=_uuid", "find", "queue", vmid_ex_id, NULL);
virCommandSetOutputBuffer(cmd, &queue_uuid);
if (virCommandRun(cmd, NULL) < 0) {
--
2.32.0
More information about the libvir-list
mailing list