Skip to content

Commit

Permalink
flow_classify: fix leaking rules on delete
Browse files Browse the repository at this point in the history
[ upstream commit 016441e ]

Rules in a classify table were not freed if the table
had a delete function.

Fixes: be41ac2 ("flow_classify: introduce flow classify library")

Signed-off-by: Owen Hilyard <ohilyard@iol.unh.edu>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
  • Loading branch information
Owen Hilyard authored and bluca committed Jul 12, 2021
1 parent 75be3a8 commit 7cd2146
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/librte_flow_classify/rte_flow_classify.c
Expand Up @@ -579,12 +579,12 @@ rte_flow_classify_table_entry_delete(struct rte_flow_classifier *cls,
&rule->u.key.key_del,
&rule->key_found,
&rule->entry);

if (ret == 0)
free(rule);
return ret;
}
}
}
free(rule);
return ret;
}

Expand Down

0 comments on commit 7cd2146

Please sign in to comment.