connmgr: Fix memory leak destroying ofmonitor.
authorBen Pfaff <blp@nicira.com>
Wed, 26 Dec 2012 17:42:33 +0000 (09:42 -0800)
committerBen Pfaff <blp@nicira.com>
Wed, 9 Jan 2013 01:03:45 +0000 (17:03 -0800)
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@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
ofproto/connmgr.c

index 1dc9082..8a84da5 100644 (file)
@@ -1807,6 +1807,7 @@ void
 ofmonitor_destroy(struct ofmonitor *m)
 {
     if (m) {
+        minimatch_destroy(&m->match);
         hmap_remove(&m->ofconn->monitors, &m->ofconn_node);
         free(m);
     }