Correct handling of cloning loop avoidance: rtalloc1 may return a null

pointer in which case we should not do the unlock.

Supported by:	FreeBSD Foundatin
This commit is contained in:
Sam Leffler 2003-10-16 16:17:17 +00:00
parent 00a12f3ae7
commit ea04521020

View File

@ -1000,7 +1000,8 @@ rt_setgate(struct rtentry *rt, struct sockaddr *dst, struct sockaddr *gate)
rt->rt_gwroute = 0;
return EDQUOT; /* failure */
}
RT_UNLOCK(rt->rt_gwroute);
if (rt->rt_gwroute != NULL)
RT_UNLOCK(rt->rt_gwroute);
}
/*