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>
This commit is contained in:
@@ -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);
|
rt = ip_route_output_flow(sock_net(sk), &fl4, sk);
|
||||||
if (IS_ERR(rt)) {
|
if (IS_ERR(rt)) {
|
||||||
err = PTR_ERR(rt);
|
err = PTR_ERR(rt);
|
||||||
|
rt = NULL;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user