aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/em_text.c
diff options
context:
space:
mode:
authorThomas Graf <tgraf@infradead.org>2010-10-31 12:37:38 -0400
committerDavid S. Miller <davem@davemloft.net>2010-10-31 12:37:38 -0400
commit5ec1cea057495b8f10bab0c1396a9d8e46b7b0a8 (patch)
tree2115be233a12ce363f669831f5a2a554bafc8565 /net/sched/em_text.c
parent636f8c6f682ee179ff39c94dc4d0be0ddd6c8cdd (diff)
text ematch: check for NULL pointer before destroying textsearch config
While validating the configuration em_ops is already set, thus the individual destroy functions are called, but the ematch data has not been allocated and associated with the ematch yet. Signed-off-by: Thomas Graf <tgraf@infradead.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/em_text.c')
-rw-r--r--net/sched/em_text.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/sched/em_text.c b/net/sched/em_text.c
index 763253257411..ea8f566e720c 100644
--- a/net/sched/em_text.c
+++ b/net/sched/em_text.c
@@ -103,7 +103,8 @@ retry:
103 103
104static void em_text_destroy(struct tcf_proto *tp, struct tcf_ematch *m) 104static void em_text_destroy(struct tcf_proto *tp, struct tcf_ematch *m)
105{ 105{
106 textsearch_destroy(EM_TEXT_PRIV(m)->config); 106 if (EM_TEXT_PRIV(m) && EM_TEXT_PRIV(m)->config)
107 textsearch_destroy(EM_TEXT_PRIV(m)->config);
107} 108}
108 109
109static int em_text_dump(struct sk_buff *skb, struct tcf_ematch *m) 110static int em_text_dump(struct sk_buff *skb, struct tcf_ematch *m)