aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander V. Chernikov <melifaro@FreeBSD.org>2018-03-31 15:06:14 +0000
committerAlexander V. Chernikov <melifaro@FreeBSD.org>2018-03-31 15:06:14 +0000
commit2d5832444f0096a4cc4d5d0077264e69b9aa4b51 (patch)
tree4600f1e4860f51bf9f67d818441e2f71691b0acd
parent756e49c3039a69d8cd0224d41d9b84f911223ee3 (diff)
downloadsrc-2d5832444f0096a4cc4d5d0077264e69b9aa4b51.tar.gz
src-2d5832444f0096a4cc4d5d0077264e69b9aa4b51.zip
Fix memory leaks in route(8).
Submitted by: Tom Rix (trix_juniper.net) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D9676
Notes
Notes: svn path=/head/; revision=331844
-rw-r--r--sbin/route/route.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sbin/route/route.c b/sbin/route/route.c
index f90f5da40a31..79ec08972738 100644
--- a/sbin/route/route.c
+++ b/sbin/route/route.c
@@ -523,6 +523,7 @@ retry:
printf("done\n");
}
}
+ free(buf);
return (error);
}
@@ -1439,6 +1440,7 @@ retry2:
rtm = (struct rt_msghdr *)(void *)next;
print_rtmsg(rtm, rtm->rtm_msglen);
}
+ free(buf);
}
static void