diff mbox

[ovs-dev] rstp/stp: Unref the rstp/stp when bridges destroyed.

Message ID 1490107802-26976-1-git-send-email-nic@opencloud.tech
State Not Applicable
Headers show

Commit Message

nickcooper-zhangtonghao March 21, 2017, 2:50 p.m. UTC
When bridges destroyed, which stp enabled, you can
still get stp info via the command 'ovs-appctl stp/show'.
And the rstp is also in the same case. We should unref
them. The rstp/stp ports have been unregistered via
'ofproto_port_unregister' function when ports destroyed.
We will unref rstp/stp struct in the 'destruct' of
ofproto-dpif provider.

Signed-off-by: nickcooper-zhangtonghao <nic@opencloud.tech>
---
 ofproto/ofproto-dpif.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox

Patch

diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
index 523adad..4beacda 100644
--- a/ofproto/ofproto-dpif.c
+++ b/ofproto/ofproto-dpif.c
@@ -1494,6 +1494,8 @@  destruct(struct ofproto *ofproto_)
     hmap_destroy(&ofproto->bundles);
     mac_learning_unref(ofproto->ml);
     mcast_snooping_unref(ofproto->ms);
+    stp_unref(ofproto->stp);
+    rstp_unref(ofproto->rstp);
 
     sset_destroy(&ofproto->ports);
     sset_destroy(&ofproto->ghost_ports);