svn commit: r260124 - head/usr.bin/netstat
Alexander V. Chernikov
melifaro at FreeBSD.org
Tue Dec 31 12:11:48 UTC 2013
Author: melifaro
Date: Tue Dec 31 12:11:48 2013
New Revision: 260124
URL: http://svnweb.freebsd.org/changeset/base/260124
Log:
Explicitly free rt_tables to please Coverity.
Reported by: Coverity
Coverity CID: 1147174
MFC after: 2 weeks
Modified:
head/usr.bin/netstat/route.c
Modified: head/usr.bin/netstat/route.c
==============================================================================
--- head/usr.bin/netstat/route.c Tue Dec 31 11:54:37 2013 (r260123)
+++ head/usr.bin/netstat/route.c Tue Dec 31 12:11:48 2013 (r260124)
@@ -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);
}
/*
More information about the svn-src-head
mailing list