Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/ndp PR/53371: Thomas Barabosch: Potential memory le...
details: https://anonhg.NetBSD.org/src/rev/1d64c188e1a9
branches: trunk
changeset: 319944:1d64c188e1a9
user: christos <christos%NetBSD.org@localhost>
date: Sat Jun 16 13:09:41 2018 +0000
description:
PR/53371: Thomas Barabosch: Potential memory leak in usr.sbin/ndp/ndp.c
diffstat:
usr.sbin/ndp/ndp.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diffs (33 lines):
diff -r 6e7516613803 -r 1d64c188e1a9 usr.sbin/ndp/ndp.c
--- a/usr.sbin/ndp/ndp.c Sat Jun 16 12:49:46 2018 +0000
+++ b/usr.sbin/ndp/ndp.c Sat Jun 16 13:09:41 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ndp.c,v 1.50 2017/06/28 08:17:50 ozaki-r Exp $ */
+/* $NetBSD: ndp.c,v 1.51 2018/06/16 13:09:41 christos Exp $ */
/* $KAME: ndp.c,v 1.121 2005/07/13 11:30:13 keiichi Exp $ */
/*
@@ -376,6 +376,7 @@
return 1;
}
makeaddr(mysin, res->ai_addr);
+ freeaddrinfo(res);
ea = (u_char *)LLADDR(&sdl_m);
if (ndp_ether_aton(eaddr, ea) == 0)
sdl_m.sdl_alen = 6;
@@ -441,6 +442,7 @@
return;
}
makeaddr(mysin, res->ai_addr);
+ freeaddrinfo(res);
do_foreach(&mysin->sin6_addr, host, 0);
if (found_entry == 0) {
(void)getnameinfo((struct sockaddr *)(void *)mysin,
@@ -467,6 +469,7 @@
return;
}
makeaddr(mysin, res->ai_addr);
+ freeaddrinfo(res);
do_foreach(&mysin->sin6_addr, host, NDP_F_DELETE);
}
Home |
Main Index |
Thread Index |
Old Index