Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/routed PR/9390: Jarkko Torppa: Routed leaks memory when...



details:   https://anonhg.NetBSD.org/src/rev/d4dc443eed62
branches:  trunk
changeset: 481995:d4dc443eed62
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Feb 11 18:39:02 2000 +0000

description:
PR/9390: Jarkko Torppa: Routed leaks memory when route addition fails.

diffstat:

 sbin/routed/table.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r d599ad643d3c -r d4dc443eed62 sbin/routed/table.c
--- a/sbin/routed/table.c       Fri Feb 11 16:14:32 2000 +0000
+++ b/sbin/routed/table.c       Fri Feb 11 18:39:02 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: table.c,v 1.11 1999/11/19 10:46:35 bouyer Exp $        */
+/*     $NetBSD: table.c,v 1.12 2000/02/11 18:39:02 christos Exp $      */
 
 /*
  * Copyright (c) 1983, 1988, 1993
@@ -37,7 +37,7 @@
 static char sccsid[] __attribute__((unused)) = "@(#)tables.c   8.1 (Berkeley) 6/5/93";
 #elif defined(__NetBSD__)
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: table.c,v 1.11 1999/11/19 10:46:35 bouyer Exp $");
+__RCSID("$NetBSD: table.c,v 1.12 2000/02/11 18:39:02 christos Exp $");
 #endif
 
 #include "defs.h"
@@ -1733,6 +1733,7 @@
                                    rhead, rt->rt_nodes)) {
                msglog("rnh_addaddr() failed for %s mask=%#lx",
                       naddr_ntoa(dst), (u_long)mask);
+               free(rt);
        }
 }
 



Home | Main Index | Thread Index | Old Index