Skip to content

Commit

Permalink
openvswitch: Use kmem_cache_free() instead of kfree()
Browse files Browse the repository at this point in the history
memory allocated by kmem_cache_alloc() should be freed using
kmem_cache_free(), not kfree().

Fixes: e298e50 ('openvswitch: Per cpu flow stats.')
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Jesse Gross <jesse@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Wei Yongjun authored and David S. Miller committed Jan 9, 2014
1 parent 54b553e commit ece37c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/openvswitch/flow_table.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit ece37c8

Please sign in to comment.