Merge tag 'stm32-dt-for-v5.14-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-microblaze.git] / net / sched / cls_tcindex.c
index 5b27453..e9a8a2c 100644 (file)
@@ -278,6 +278,8 @@ static int tcindex_filter_result_init(struct tcindex_filter_result *r,
                             TCA_TCINDEX_POLICE);
 }
 
+static void tcindex_free_perfect_hash(struct tcindex_data *cp);
+
 static void tcindex_partial_destroy_work(struct work_struct *work)
 {
        struct tcindex_data *p = container_of(to_rcu_work(work),
@@ -285,7 +287,8 @@ static void tcindex_partial_destroy_work(struct work_struct *work)
                                              rwork);
 
        rtnl_lock();
-       kfree(p->perfect);
+       if (p->perfect)
+               tcindex_free_perfect_hash(p);
        kfree(p);
        rtnl_unlock();
 }