Date: Thu, 7 Aug 2003 15:30:55 -0700 (PDT) From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 35749 for review Message-ID: <200308072230.h77MUtBU024118@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=35749 Change 35749 by sam@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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200308072230.h77MUtBU024118>