Module Name: src
Committed By: martin
Date: Sat Apr 1 16:46:34 UTC 2023
Modified Files:
src/usr.sbin/route6d [netbsd-8]: route6d.c
Log Message:
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
To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.68.8.1 src/usr.sbin/route6d/route6d.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/route6d/route6d.c
diff -u src/usr.sbin/route6d/route6d.c:1.68 src/usr.sbin/route6d/route6d.c:1.68.8.1
--- src/usr.sbin/route6d/route6d.c:1.68 Mon Apr 4 07:37:08 2016
+++ src/usr.sbin/route6d/route6d.c Sat Apr 1 16:46:33 2023
@@ -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;