Felix Fietkau 0ff90b6c20 netfilter: nf_flow_offload: fix use-after-free and a resource leak
flow_offload_del frees the flow, so all associated resource must be
freed before.

Since the ct entry in struct flow_offload_entry was allocated by
flow_offload_alloc, it should be freed by flow_offload_free to take care
of the error handling path when flow_offload_add fails.

While at it, make flow_offload_del static, since it should never be
called directly, only from the gc step

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2018-02-07 11:55:52 +01:00
..
2017-05-02 10:16:04 -04:00
2011-07-01 16:11:15 -07:00
2011-07-01 16:11:15 -07:00
2017-04-15 11:51:33 +02:00
2015-05-14 13:00:27 +02:00
2017-07-25 12:31:37 -07:00
2016-12-25 17:21:22 +01:00