From: Jason Wang <jasow...@redhat.com>

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 <jasow...@redhat.com>
Message-id: 1422860798-17495-3-git-send-email-jasow...@redhat.com
Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com>
---
 net/net.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/net.c b/net/net.c
index 7acc162..74e651e 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);
 }
 
-- 
2.1.0


Reply via email to