From 64a55d60665245174acf6445e0e3f1ec7a53cfe0 Mon Sep 17 00:00:00 2001 From: Jason Wang Date: Mon, 2 Feb 2015 15:06:37 +0800 Subject: net: del hub port when peer is deleted We should del hub port when peer is deleted since it will not be reused and will only be freed during exit. Signed-off-by: Jason Wang Message-id: 1422860798-17495-3-git-send-email-jasowang@redhat.com Signed-off-by: Stefan Hajnoczi --- net/net.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'net') diff --git a/net/net.c b/net/net.c index 7acc162b44..74e651e17f 100644 --- a/net/net.c +++ b/net/net.c @@ -996,6 +996,8 @@ void net_host_device_remove(Monitor *mon, const QDict *qdict) error_report("invalid host network device '%s'", device); return; } + + qemu_del_net_client(nc->peer); qemu_del_net_client(nc); } -- cgit v1.2.3