ofproto-dpif-xlate: Unreference handles on xbridge removal.
authorEthan Jackson <ethan@nicira.com>
Fri, 16 Aug 2013 01:37:41 +0000 (18:37 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 16 Aug 2013 17:08:24 +0000 (10:08 -0700)
Reported-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
[blp@nicira.com added one more hmap_destroy()]
Signed-off-by: Ben Pfaff <blp@nicira.com>
ofproto/ofproto-dpif-xlate.c

index 8be8088..e80ec84 100644 (file)
@@ -289,6 +289,12 @@ xlate_remove_ofproto(struct ofproto_dpif *ofproto)
     }
 
     hmap_remove(&xbridges, &xbridge->hmap_node);
+    mac_learning_unref(xbridge->ml);
+    mbridge_unref(xbridge->mbridge);
+    dpif_sflow_unref(xbridge->sflow);
+    dpif_ipfix_unref(xbridge->ipfix);
+    stp_unref(xbridge->stp);
+    hmap_destroy(&xbridge->xports);
     free(xbridge->name);
     free(xbridge);
 }