diff --git a/net/sched/act_sample.c b/net/sched/act_sample.c index 1ba0df23875624e360acf4cc8131dcce8bc67ac4..74c5d7e6a0fac0581e0863e624b886e5d1a68f93 100644 --- a/net/sched/act_sample.c +++ b/net/sched/act_sample.c @@ -103,7 +103,8 @@ static void tcf_sample_cleanup(struct tc_action *a) psample_group = rtnl_dereference(s->psample_group); RCU_INIT_POINTER(s->psample_group, NULL); - psample_group_put(psample_group); + if (psample_group) + psample_group_put(psample_group); } static bool tcf_sample_dev_ok_push(struct net_device *dev)