Fix memory leak in case of adding a host route on top of another one.

Pointed-out-by:  Bill Fenner <fenner@parc.xerox.com>
This commit is contained in:
Garrett Wollman 1996-01-24 20:27:19 +00:00
parent c524c9334d
commit fde327d6ab

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)route.c 8.2 (Berkeley) 11/15/93
* $Id: route.c,v 1.28 1995/12/02 19:28:24 bde Exp $
* $Id: route.c,v 1.29 1995/12/14 09:53:27 phk Exp $
*/
#include <sys/param.h>
@ -489,6 +489,8 @@ rtrequest(req, dst, gateway, netmask, flags, ret_nrt)
rn = rnh->rnh_addaddr((caddr_t)ndst,
(caddr_t)netmask,
rnh, rt->rt_nodes);
} else if (rt2) {
RTFREE(rt2);
}
}