ipv4: Don't ip_rt_put() an error pointer in RAW sockets.
authorDavid S. Miller <davem@davemloft.net>
Mon, 28 Mar 2011 23:51:15 +0000 (16:51 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Mar 2011 23:51:15 +0000 (16:51 -0700)
Reported-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/raw.c

index e837ffd3edc3dd0f9b2d9d03d82489b1464146c2..2d3c72e5bbbf054b16f88d50b606d22673f1e5b5 100644 (file)
@@ -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;
                }
        }