1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-18 15:30:21 +00:00

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
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=121139

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);
}
/*