mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-02 13:47:13 +03:00
virsh: fix memory leak in cmdNetworkInfo
* tools/virsh.c: avoid memory leak in cmdNetworkInfo. * how to reproduce? % valgrind -v --leak-check=yes virsh net-info default https://bugzilla.redhat.com/show_bug.cgi?id=722806 Signed-off-by: Alex Jia <ajia@redhat.com>
This commit is contained in:
parent
df97107787
commit
22da8c941c
@ -5597,6 +5597,7 @@ cmdNetworkInfo(vshControl *ctl, const vshCmd *cmd)
|
|||||||
if (bridge)
|
if (bridge)
|
||||||
vshPrint(ctl, "%-15s %s\n", _("Bridge:"), bridge);
|
vshPrint(ctl, "%-15s %s\n", _("Bridge:"), bridge);
|
||||||
|
|
||||||
|
VIR_FREE(bridge);
|
||||||
virNetworkFree(network);
|
virNetworkFree(network);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user