提交 5ec1cea0 编写于 作者: T Thomas Graf 提交者: David S. Miller

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: NThomas Graf <tgraf@infradead.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 636f8c6f
...@@ -103,6 +103,7 @@ static int em_text_change(struct tcf_proto *tp, void *data, int len, ...@@ -103,6 +103,7 @@ static int em_text_change(struct tcf_proto *tp, void *data, int len,
static void em_text_destroy(struct tcf_proto *tp, struct tcf_ematch *m) static void em_text_destroy(struct tcf_proto *tp, struct tcf_ematch *m)
{ {
if (EM_TEXT_PRIV(m) && EM_TEXT_PRIV(m)->config)
textsearch_destroy(EM_TEXT_PRIV(m)->config); textsearch_destroy(EM_TEXT_PRIV(m)->config);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册