Explorar o código

openvswitch: Use kmem_cache_free() instead of kfree()

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@trendmicro.com.cn>
Acked-by: Jesse Gross <jesse@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Wei Yongjun %!s(int64=11) %!d(string=hai) anos
pai
achega
ece37c87ab
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      net/openvswitch/flow_table.c

+ 1 - 1
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);
 }