[ovs-dev] [PATCH 05/16] ofproto: Fix memory leak in ofproto_destroy().

Ben Pfaff blp at nicira.com
Fri Jun 6 05:01:59 UTC 2014


Found by valgrind.

Signed-off-by: Ben Pfaff <blp at nicira.com>
---
 ofproto/ofproto.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
index e3d8509..26f1ed4 100644
--- a/ofproto/ofproto.c
+++ b/ofproto/ofproto.c
@@ -1341,6 +1341,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);
-- 
1.9.1




More information about the dev mailing list