diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 4b552c10e7b9..62ce6981942b 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c @@ -2117,6 +2117,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;