Hi Owen, > -----Original Message----- > From: [email protected] <[email protected]> > Sent: Wednesday, June 23, 2021 6:07 PM > To: Iremonger, Bernard <[email protected]> > Cc: [email protected]; [email protected]; Owen Hilyard > <[email protected]> > Subject: [PATCH v2] flow_classify: fix leaking rules on delete > > From: Owen Hilyard <[email protected]> > > Rules in a classify table were not freed if the table had a delete function. > > Fixes: be41ac2a3 ("flow_classify: introduce flow classify library") > > Signed-off-by: Owen Hilyard <[email protected]> > --- > lib/flow_classify/rte_flow_classify.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/lib/flow_classify/rte_flow_classify.c > b/lib/flow_classify/rte_flow_classify.c > index f125267e8..d3ba2ed22 100644 > --- a/lib/flow_classify/rte_flow_classify.c > +++ b/lib/flow_classify/rte_flow_classify.c > @@ -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; > } > > -- > 2.30.2 This patch should be backported. Please add the following line after the Fixes line: Cc: [email protected]
Otherwise Acked-by: Bernard Iremonger <[email protected]>

