ofproto: Fix memory leak in ofproto_destroy().
authorBen Pfaff <blp@nicira.com>
Fri, 6 Jun 2014 00:43:46 +0000 (17:43 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 6 Jun 2014 20:55:31 +0000 (13:55 -0700)
Found by valgrind.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Thomas Graf <tgraf@suug.ch>
ofproto/ofproto.c

index 656dab5..4cb0520 100644 (file)
@@ -1339,6 +1339,9 @@ ofproto_destroy__(struct ofproto *ofproto)
 
     hmap_destroy(&ofproto->deletions);
 
+    ovs_assert(hindex_is_empty(&ofproto->cookies));
+    hindex_destroy(&ofproto->cookies);
+
     free(ofproto->vlan_bitmap);
 
     ofproto->ofproto_class->dealloc(ofproto);