diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 919c7fa5f02d..48a8c7daa635 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c @@ -2098,6 +2098,7 @@ replay: } if (chain->tmplt_ops && chain->tmplt_ops != tp->ops) { + tfilter_put(tp, fh); NL_SET_ERR_MSG(extack, "Chain template is set to a different filter kind"); err = -EINVAL; goto errout;