[ovs-dev] [PATCH] ofproto: Fix memory leak in flow deletion.

Jarno Rajahalme jrajahalme at nicira.com
Fri May 15 17:59:41 UTC 2015


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 at nicira.com>
---
 ofproto/ofproto.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
index 927521b..e062732 100644
--- a/ofproto/ofproto.c
+++ b/ofproto/ofproto.c
@@ -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);
-- 
1.7.10.4




More information about the dev mailing list