[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPgLHd_jaxf4jsvUzBhE_RFioHgZzvmWhA=d_J5phUOhBGy49g@mail.gmail.com>
Date: Wed, 8 Jan 2014 18:13:14 +0800
From: Wei Yongjun <weiyj.lk@...il.com>
To: jesse@...ira.com, pshelar@...ira.com, davem@...emloft.net
Cc: yongjun_wei@...ndmicro.com.cn, dev@...nvswitch.org,
netdev@...r.kernel.org
Subject: [PATCH -next] openvswitch: Use kmem_cache_free() instead of kfree()
From: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
memory allocated by kmem_cache_alloc() should be freed using
kmem_cache_free(), not kfree().
Fixes: e298e5057006 ('openvswitch: Per cpu flow stats.')
Signed-off-by: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
---
net/openvswitch/flow_table.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/openvswitch/flow_table.c b/net/openvswitch/flow_table.c
index b430d42..c58a0fe 100644
--- a/net/openvswitch/flow_table.c
+++ b/net/openvswitch/flow_table.c
@@ -104,7 +104,7 @@ struct sw_flow *ovs_flow_alloc(bool percpu_stats)
}
return flow;
err:
- kfree(flow);
+ kmem_cache_free(flow_cache, flow);
return ERR_PTR(-ENOMEM);
}
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists