diff options
| author | Jeevan Shriram <jshriram@codeaurora.org> | 2015-11-09 15:11:42 -0800 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 21:12:07 -0700 |
| commit | 70db50a9b2019684c41ec1150352aaa6e0bb1bc3 (patch) | |
| tree | fc93ea8bf99ac342affbbd817181e8a915c1d184 /net/ipv4/tcp.c | |
| parent | 7abd9a80d94e4c3f5e355170a02addcba0f052d7 (diff) | |
net: ipv4: fix compilation warning for uninitialized variable
It is possible that the 'in' variable is used without
initialization. This change fixes uninitialized variable usage.
Change-Id: If26733110b29ec1c1150f1da50efa0c1ac6c2796
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
Diffstat (limited to 'net/ipv4/tcp.c')
| -rw-r--r-- | net/ipv4/tcp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index b799f20387c6..f6582e249aeb 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -3277,7 +3277,7 @@ int tcp_nuke_addr(struct net *net, struct sockaddr *addr) int family = addr->sa_family; unsigned int bucket; - struct in_addr *in; + struct in_addr *in = NULL; #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) struct in6_addr *in6 = NULL; #endif @@ -3322,7 +3322,7 @@ restart: if (s4 == LOOPBACK4_IPV6) continue; - if (in->s_addr != s4 && + if (in && in->s_addr != s4 && !(in->s_addr == INADDR_ANY && !tcp_is_local(net, s4))) continue; |
