Commit 5ec1cea0 authored by Thomas Graf's avatar Thomas Graf Committed by 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: default avatarThomas Graf <tgraf@infradead.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment