aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorJason Wang <jasowang@redhat.com>2015-02-02 15:06:37 +0800
committerStefan Hajnoczi <stefanha@redhat.com>2015-02-06 14:06:44 +0000
commit64a55d60665245174acf6445e0e3f1ec7a53cfe0 (patch)
tree07122fcc90e39dc929b2725a35c6a0a86ccc7d41 /net
parent07636d53999092daa9e3d281ea137be0795d7078 (diff)
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 <jasowang@redhat.com> Message-id: 1422860798-17495-3-git-send-email-jasowang@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'net')
-rw-r--r--net/net.c2
1 files changed, 2 insertions, 0 deletions
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);
}