PERFORCE change 35749 for review
Sam Leffler
sam at FreeBSD.org
Thu Aug 7 15:30:57 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=35749
Change 35749 by sam at sam_ebb on 2003/08/07 15:29:55
o must unlock before destroying mutex
o must lock rt_gwroute before freeing when cleaning up on error
Affected files ...
.. //depot/projects/netperf/sys/net/route.c#5 edit
Differences ...
==== //depot/projects/netperf/sys/net/route.c#5 (text+ko) ====
@@ -275,6 +275,7 @@
/*
* and the rtentry itself of course
*/
+ RT_UNLOCK(rt);
RT_LOCK_DESTROY(rt);
Free(rt);
return;
@@ -648,6 +649,7 @@
*/
RT_LOCK(rt);
if ((error = rt_setgate(rt, dst, gateway)) != 0) {
+ RT_UNLOCK(rt);
RT_LOCK_DESTROY(rt);
Free(rt);
senderr(error);
@@ -707,11 +709,11 @@
*/
if (rn == 0) {
if (rt->rt_gwroute)
- rtfree(rt->rt_gwroute);
+ RTFREE(rt->rt_gwroute);
if (rt->rt_ifa)
IFAFREE(rt->rt_ifa);
Free(rt_key(rt));
- /* XXX still locked */
+ RT_UNLOCK(rt);
RT_LOCK_DESTROY(rt);
Free(rt);
senderr(EEXIST);
More information about the p4-projects
mailing list