diff options
-rw-r--r-- | net/netfilter/nf_conntrack_core.c | 4 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_netlink.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index 7e83f74cd5d..90ce9ddb945 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c | |||
@@ -469,7 +469,7 @@ struct nf_conn *nf_conntrack_alloc(struct net *net, | |||
469 | const struct nf_conntrack_tuple *repl, | 469 | const struct nf_conntrack_tuple *repl, |
470 | gfp_t gfp) | 470 | gfp_t gfp) |
471 | { | 471 | { |
472 | struct nf_conn *ct = NULL; | 472 | struct nf_conn *ct; |
473 | 473 | ||
474 | if (unlikely(!nf_conntrack_hash_rnd_initted)) { | 474 | if (unlikely(!nf_conntrack_hash_rnd_initted)) { |
475 | get_random_bytes(&nf_conntrack_hash_rnd, 4); | 475 | get_random_bytes(&nf_conntrack_hash_rnd, 4); |
@@ -551,7 +551,7 @@ init_conntrack(struct net *net, | |||
551 | } | 551 | } |
552 | 552 | ||
553 | ct = nf_conntrack_alloc(net, tuple, &repl_tuple, GFP_ATOMIC); | 553 | ct = nf_conntrack_alloc(net, tuple, &repl_tuple, GFP_ATOMIC); |
554 | if (ct == NULL || IS_ERR(ct)) { | 554 | if (IS_ERR(ct)) { |
555 | pr_debug("Can't allocate conntrack.\n"); | 555 | pr_debug("Can't allocate conntrack.\n"); |
556 | return (struct nf_conntrack_tuple_hash *)ct; | 556 | return (struct nf_conntrack_tuple_hash *)ct; |
557 | } | 557 | } |
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c index 00e8c27130f..3dddec6d2f7 100644 --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c | |||
@@ -1134,7 +1134,7 @@ ctnetlink_create_conntrack(struct nlattr *cda[], | |||
1134 | struct nf_conntrack_helper *helper; | 1134 | struct nf_conntrack_helper *helper; |
1135 | 1135 | ||
1136 | ct = nf_conntrack_alloc(&init_net, otuple, rtuple, GFP_ATOMIC); | 1136 | ct = nf_conntrack_alloc(&init_net, otuple, rtuple, GFP_ATOMIC); |
1137 | if (ct == NULL || IS_ERR(ct)) | 1137 | if (IS_ERR(ct)) |
1138 | return -ENOMEM; | 1138 | return -ENOMEM; |
1139 | 1139 | ||
1140 | if (!cda[CTA_TIMEOUT]) | 1140 | if (!cda[CTA_TIMEOUT]) |