From 3d48ce9437e8cd35e469676ae3a68701f3dc49a6 Mon Sep 17 00:00:00 2001 From: John Ferlan Date: Wed, 2 Dec 2020 07:43:15 -0500 Subject: [PATCH] util: Fix memory leak in virNetDevOpenvswitchInterfaceGetMaster MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since 032548c4 @cmd was never autofree'd. Perhaps as a result of VIR_AUTOPTR type changes occurring at roughly the same time so the copy pasta missed this. Found by Coverity. Signed-off-by: John Ferlan Reviewed-by: Ján Tomko Signed-off-by: Ján Tomko --- 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 7452527f49..d380b0cf22 100644 --- a/src/util/virnetdevopenvswitch.c +++ b/src/util/virnetdevopenvswitch.c @@ -428,7 +428,7 @@ virNetDevOpenvswitchInterfaceStats(const char *ifname, int virNetDevOpenvswitchInterfaceGetMaster(const char *ifname, char **master) { - virCommandPtr cmd = virNetDevOpenvswitchCreateCmd(); + g_autoptr(virCommand) cmd = virNetDevOpenvswitchCreateCmd(); int exitstatus; *master = NULL;