From: David S. Miller Date: Mon, 28 Mar 2011 23:51:15 +0000 (-0700) Subject: ipv4: Don't ip_rt_put() an error pointer in RAW sockets. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4910ac6c526d2868adcb5893e0c428473de862b5;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git ipv4: Don't ip_rt_put() an error pointer in RAW sockets. Reported-by: Marc Kleine-Budde Signed-off-by: David S. Miller --- 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; } }