[ovs-dev] [leaks 4/7] connmgr: Fix memory leak destroying ofmonitor.

Ben Pfaff blp at nicira.com
Wed Dec 26 20:38:45 UTC 2012


This should be pretty minor because it only leaks memory if the match does
not fit in the inline area of a miniflow and minimask.  I imagine that the
most common match used for an ofmonitor is "match everything", which
wouldn't leak.

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

diff --git a/ofproto/connmgr.c b/ofproto/connmgr.c
index 77b7b39..2e82f5d 100644
--- a/ofproto/connmgr.c
+++ b/ofproto/connmgr.c
@@ -1782,6 +1782,7 @@ void
 ofmonitor_destroy(struct ofmonitor *m)
 {
     if (m) {
+        minimatch_destroy(&m->match);
         hmap_remove(&m->ofconn->monitors, &m->ofconn_node);
         free(m);
     }
-- 
1.7.2.5




More information about the dev mailing list