dect
/
linux-2.6
Archived
13
0
Fork 0

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>
This commit is contained in:
Dan Carpenter 2013-01-25 18:44:57 +03:00 committed by Simon Horman
parent 5b76c4948f
commit b425df4cdd
1 changed files with 2 additions and 0 deletions

View File

@ -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;