Source-Changes-HG archive

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

[src/netbsd-8]: src/usr.sbin/route6d Pull up following revision(s) (requested...



details:   https://anonhg.NetBSD.org/src/rev/ae9c1f898800
branches:  netbsd-8
changeset: 374125:ae9c1f898800
user:      martin <martin%NetBSD.org@localhost>
date:      Sat Apr 01 16:46:33 2023 +0000

description:
Pull up following revision(s) (requested by riastradh in ticket #1820):

        usr.sbin/route6d/route6d.c: revision 1.72

PR/53365: Thomas Barabosch: memory leak in route6d

diffstat:

 usr.sbin/route6d/route6d.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (34 lines):

diff -r 1457845e1dbe -r ae9c1f898800 usr.sbin/route6d/route6d.c
--- a/usr.sbin/route6d/route6d.c        Sat Apr 01 16:43:17 2023 +0000
+++ b/usr.sbin/route6d/route6d.c        Sat Apr 01 16:46:33 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: route6d.c,v 1.68 2016/04/04 07:37:08 ozaki-r Exp $     */
+/*     $NetBSD: route6d.c,v 1.68.8.1 2023/04/01 16:46:33 martin Exp $  */
 /*     $KAME: route6d.c,v 1.94 2002/10/26 20:08:55 itojun Exp $        */
 
 /*
@@ -32,7 +32,7 @@
 
 #include <sys/cdefs.h>
 #ifndef        lint
-__RCSID("$NetBSD: route6d.c,v 1.68 2016/04/04 07:37:08 ozaki-r Exp $");
+__RCSID("$NetBSD: route6d.c,v 1.68.8.1 2023/04/01 16:46:33 martin Exp $");
 #endif
 
 #include <stdbool.h>
@@ -570,6 +570,7 @@ init(void)
        index2ifc = NULL;
        snprintf(port, sizeof(port), "%u", RIP6_PORT);
 
+       freeaddrinfo(res);
        memset(&hints, 0, sizeof(hints));
        hints.ai_family = PF_INET6;
        hints.ai_socktype = SOCK_DGRAM;
@@ -637,6 +638,7 @@ init(void)
                /*NOTREACHED*/
        }
        memcpy(&ripsin, res->ai_addr, res->ai_addrlen);
+       freeaddrinfo(res);
 
        set[0].fd = ripsock;
        set[0].events = POLLIN;



Home | Main Index | Thread Index | Old Index