aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/act_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched/act_api.c')
-rw-r--r--net/sched/act_api.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/sched/act_api.c b/net/sched/act_api.c
index 2095c83ce773..e10456ef6f7a 100644
--- a/net/sched/act_api.c
+++ b/net/sched/act_api.c
@@ -900,8 +900,6 @@ tca_action_gd(struct net *net, struct nlattr *nla, struct nlmsghdr *n,
900 goto err; 900 goto err;
901 } 901 }
902 act->order = i; 902 act->order = i;
903 if (event == RTM_GETACTION)
904 act->tcfa_refcnt++;
905 list_add_tail(&act->list, &actions); 903 list_add_tail(&act->list, &actions);
906 } 904 }
907 905
@@ -914,7 +912,8 @@ tca_action_gd(struct net *net, struct nlattr *nla, struct nlmsghdr *n,
914 return ret; 912 return ret;
915 } 913 }
916err: 914err:
917 tcf_action_destroy(&actions, 0); 915 if (event != RTM_GETACTION)
916 tcf_action_destroy(&actions, 0);
918 return ret; 917 return ret;
919} 918}
920 919