mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 12:35:17 +00: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)
|
||||
vshPrint(ctl, "%-15s %s\n", _("Bridge:"), bridge);
|
||||
|
||||
VIR_FREE(bridge);
|
||||
virNetworkFree(network);
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user