diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-01-25 16:44:57 +0100 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2013-01-28 02:14:37 +0100 |
commit | b425df4cdd953a400d814b4474c9d3ec04481858 (patch) | |
tree | ec7a8fab76d06b6841f8c4a35d98e197794d746c /net | |
parent | netfilter: x_tables: print correct hook names for ARP (diff) | |
download | linux-b425df4cdd953a400d814b4474c9d3ec04481858.tar.xz linux-b425df4cdd953a400d814b4474c9d3ec04481858.zip |
ipvs: freeing uninitialized pointer on error
If state != IP_VS_STATE_BACKUP then tinfo->buf is uninitialized. If
kthread_run() fails then it means we free random memory resulting in an
oops.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/ipvs/ip_vs_sync.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/netfilter/ipvs/ip_vs_sync.c b/net/netfilter/ipvs/ip_vs_sync.c index effa10c9e4e3..44fd10c539ac 100644 --- a/net/netfilter/ipvs/ip_vs_sync.c +++ b/net/netfilter/ipvs/ip_vs_sync.c @@ -1795,6 +1795,8 @@ int start_sync_thread(struct net *net, int state, char *mcast_ifn, __u8 syncid) GFP_KERNEL); if (!tinfo->buf) goto outtinfo; + } else { + tinfo->buf = NULL; } tinfo->id = id; |