MFC r311750,r311754,r311757:
r311750:
Check result from smiGetFirstNode and smiGetNodeByOID
This avoids a segfault with malformed or unanticipated files,
like IPV6-TC.txt (a file containing just TEXTUAL-CONVENTIONS).
Found with: gensnmpdef /usr/local/share/snmp/mibs/IPV6-TC.txt
r311754:
Use calloc instead of malloc + memset(.., 0, ..)
r311757:
Similar to r311750, check for the result from smiGetModule to avoid a segfault
when dereferencing a NULL pointer later on.
Choose to just check for the NULL pointer in the next for-loop for now to fix
the issue with a minimal amount of code churn
sys/queue.h use here would make more sense than using a static table
git-svn-id: svn://svn.freebsd.org/base/stable/10@312098
ccf9f872-aa2e-dd11-9fc8-
001c23d0bc1f