From 3855adf5e2ce4c1677eef7f88c22277f3e4ada8e Mon Sep 17 00:00:00 2001 From: jca Date: Sun, 25 Oct 2015 23:41:50 +0000 Subject: [PATCH] Plug memory leak introduced in r1.15. No functional change. --- usr.sbin/route6d/route6d.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/usr.sbin/route6d/route6d.c b/usr.sbin/route6d/route6d.c index e73d2922f74..a190a9d71ff 100644 --- a/usr.sbin/route6d/route6d.c +++ b/usr.sbin/route6d/route6d.c @@ -1,4 +1,4 @@ -/* $OpenBSD: route6d.c,v 1.74 2015/10/25 23:10:32 jca Exp $ */ +/* $OpenBSD: route6d.c,v 1.75 2015/10/25 23:41:50 jca Exp $ */ /* $KAME: route6d.c,v 1.111 2006/10/25 06:38:13 jinmei Exp $ */ /* @@ -372,16 +372,6 @@ main(int argc, char *argv[]) if (dflag) ifrtdump(0); - if ((ripbuf = malloc(RIP6_MAXMTU)) == NULL) { - fatal("malloc"); - /*NOTREACHED*/ - } - memset(ripbuf, 0, RIP6_MAXMTU); - ripbuf->rip6_cmd = RIP6_RESPONSE; - ripbuf->rip6_vers = RIP6_VERSION; - ripbuf->rip6_res1[0] = 0; - ripbuf->rip6_res1[1] = 0; - if (signal(SIGALRM, sighandler) == SIG_ERR || signal(SIGQUIT, sighandler) == SIG_ERR || signal(SIGTERM, sighandler) == SIG_ERR || -- 2.20.1