netfilter: ipset: fix the compile warning in ip_set_create
authorShan Wei <shanwei@cn.fujitsu.com>
Tue, 8 Mar 2011 14:37:27 +0000 (15:37 +0100)
committerPatrick McHardy <kaber@trash.net>
Tue, 8 Mar 2011 14:37:27 +0000 (15:37 +0100)
net/netfilter/ipset/ip_set_core.c:615: warning: ‘clash’ may be used uninitialized in this function

Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Patrick McHardy <kaber@trash.net>
net/netfilter/ipset/ip_set_core.c

index 8b1a54c1e400a6fbdf5cd337f6e582cf0a0bda37..618a615acc9d97ac3722c3830d3e712e7bcdeb16 100644 (file)
@@ -612,7 +612,7 @@ ip_set_create(struct sock *ctnl, struct sk_buff *skb,
              const struct nlmsghdr *nlh,
              const struct nlattr * const attr[])
 {
-       struct ip_set *set, *clash;
+       struct ip_set *set, *clash = NULL;
        ip_set_id_t index = IPSET_INVALID_ID;
        struct nlattr *tb[IPSET_ATTR_CREATE_MAX+1] = {};
        const char *name, *typename;