mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 12:57:53 +00:00
net: mvpp2: cls: Fix leaked ethtool_rx_flow_rule
The flow_rule is only used when configuring the classification tables,
and should be free'd once we're done using it. The current code only
frees it in the error path.
Fixes: 90b509b39a
("net: mvpp2: cls: Add Classification offload support")
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
903869bd10
commit
3f6f7a175a
1 changed files with 3 additions and 0 deletions
|
@ -1271,6 +1271,9 @@ int mvpp2_ethtool_cls_rule_ins(struct mvpp2_port *port,
|
|||
if (ret)
|
||||
goto clean_eth_rule;
|
||||
|
||||
ethtool_rx_flow_rule_destroy(ethtool_rule);
|
||||
efs->rule.flow = NULL;
|
||||
|
||||
memcpy(&efs->rxnfc, info, sizeof(*info));
|
||||
port->rfs_rules[efs->rule.loc] = efs;
|
||||
port->n_rfs_rules++;
|
||||
|
|
Loading…
Reference in a new issue