Fix panic in IP redirect. Panic was introduced in r293466.

Found by:	Yamagi Burmeister <lists at yamagi.org>>
This commit is contained in:
Alexander V. Chernikov 2016-01-14 16:31:00 +00:00
parent 5147131ae4
commit fcbfdb37a1

View file

@ -576,8 +576,8 @@ rtredirect_fib(struct sockaddr *dst,
* Create new route, rather than smashing route to net.
*/
create:
RTFREE(rt);
rt = NULL;
if (rt != NULL)
RTFREE_LOCKED(rt);
flags |= RTF_DYNAMIC;
bzero((caddr_t)&info, sizeof(info));