diff options
author | David S. Miller <davem@davemloft.net> | 2011-03-29 01:51:15 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-29 01:51:15 +0200 |
commit | 4910ac6c526d2868adcb5893e0c428473de862b5 (patch) | |
tree | f5fcd4425ee8ae7bd88f3a1fc4e9bb58592aff1b /net/ipv4/raw.c | |
parent | net: fix ethtool->set_flags not intended -EINVAL return value (diff) | |
download | linux-4910ac6c526d2868adcb5893e0c428473de862b5.tar.xz linux-4910ac6c526d2868adcb5893e0c428473de862b5.zip |
ipv4: Don't ip_rt_put() an error pointer in RAW sockets.
Reported-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/raw.c')
-rw-r--r-- | net/ipv4/raw.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index e837ffd3edc3..2d3c72e5bbbf 100644 --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c @@ -569,6 +569,7 @@ static int raw_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, rt = ip_route_output_flow(sock_net(sk), &fl4, sk); if (IS_ERR(rt)) { err = PTR_ERR(rt); + rt = NULL; goto done; } } |