util: Fix memory leak in virNetDevOpenvswitchInterfaceGetMaster

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 <jferlan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
John Ferlan 2020-12-02 07:43:15 -05:00 committed by Ján Tomko
parent bfcf1a3ca9
commit 3d48ce9437

View File

@ -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;