]> git.karo-electronics.de Git - linux-beck.git/commitdiff
netfilter: xt_string: Remove unnecessary initialization of struct ts_state
authorBojan Prtvar <prtvar.b@gmail.com>
Mon, 8 Sep 2014 07:51:12 +0000 (09:51 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 9 Sep 2014 14:31:25 +0000 (16:31 +0200)
The skb_find_text() accepts uninitialized textsearch state variable.

Signed-off-by: Bojan Prtvar <prtvar.b@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/xt_string.c

index d3c48b14ab94c09d74f0c74e62b94ed5fcb58af7..5699adb976521450c542c17acd13c91c6454750f 100644 (file)
@@ -29,7 +29,6 @@ string_mt(const struct sk_buff *skb, struct xt_action_param *par)
        struct ts_state state;
        bool invert;
 
-       memset(&state, 0, sizeof(struct ts_state));
        invert = conf->u.v1.flags & XT_STRING_FLAG_INVERT;
 
        return (skb_find_text((struct sk_buff *)skb, conf->from_offset,