mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 05:17:59 +03:00
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:
parent
bfcf1a3ca9
commit
3d48ce9437
@ -428,7 +428,7 @@ virNetDevOpenvswitchInterfaceStats(const char *ifname,
|
|||||||
int
|
int
|
||||||
virNetDevOpenvswitchInterfaceGetMaster(const char *ifname, char **master)
|
virNetDevOpenvswitchInterfaceGetMaster(const char *ifname, char **master)
|
||||||
{
|
{
|
||||||
virCommandPtr cmd = virNetDevOpenvswitchCreateCmd();
|
g_autoptr(virCommand) cmd = virNetDevOpenvswitchCreateCmd();
|
||||||
int exitstatus;
|
int exitstatus;
|
||||||
|
|
||||||
*master = NULL;
|
*master = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user