ofproto: Fix memory leak in flow deletion.
authorJarno Rajahalme <jrajahalme@nicira.com>
Mon, 18 May 2015 17:24:02 +0000 (10:24 -0700)
committerJarno Rajahalme <jrajahalme@nicira.com>
Mon, 18 May 2015 17:24:02 +0000 (10:24 -0700)
Fix a memory leak that was introduced in commit 834fe5cb997b (ofproto:
Additional simplifications.).  We used to unref the flow
asynchronously, but forgot to do it when the support for asynchronous
operations was removed.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
ofproto/ofproto.c

index 927521b..e062732 100644 (file)
@@ -4715,6 +4715,8 @@ delete_flows__(const struct rule_collection *rules,
 
             learned_cookies_dec(ofproto, rule_get_actions(rule),
                                 &dead_cookies);
+
+            ofproto_rule_unref(rule);
         }
         learned_cookies_flush(ofproto, &dead_cookies);
         ofmonitor_flush(ofproto->connmgr);