diff options
author | melifaro <melifaro@FreeBSD.org> | 2013-12-31 12:11:48 +0000 |
---|---|---|
committer | melifaro <melifaro@FreeBSD.org> | 2013-12-31 12:11:48 +0000 |
commit | 6fa1852c1794915137bfd83c4f5086c4553a9985 (patch) | |
tree | a6e28342d1f380a7962f3eb8b7f39c9bb5ee8824 /usr.bin | |
parent | d77ac8e0b54f31ae144016f35ef8e1c6da596b72 (diff) | |
download | FreeBSD-src-6fa1852c1794915137bfd83c4f5086c4553a9985.zip FreeBSD-src-6fa1852c1794915137bfd83c4f5086c4553a9985.tar.gz |
Explicitly free rt_tables to please Coverity.
Reported by: Coverity
Coverity CID: 1147174
MFC after: 2 weeks
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/netstat/route.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/netstat/route.c b/usr.bin/netstat/route.c index 53c9e08..75c255f 100644 --- a/usr.bin/netstat/route.c +++ b/usr.bin/netstat/route.c @@ -426,7 +426,7 @@ p_rtable_kvm(int fibnum, int af) if (kread((u_long)(rtree), (char *)(rt_tables) + fibnum * af_size, af_size) != 0) - return; + err(EX_OSERR, "error retrieving radix pointers"); for (fam = 0; fam <= AF_MAX; fam++) { int tmpfib; @@ -462,6 +462,8 @@ p_rtable_kvm(int fibnum, int af) p_rtree_kvm(head.rnh_treetop); } } + + free(rt_tables); } /* |