mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-29 08:08:37 +00:00
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 MFC after: 5 days
This commit is contained in:
parent
8406423362
commit
b55d259a14
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=311757
@ -560,6 +560,8 @@ main(int argc, char *argv[])
|
||||
level = 0;
|
||||
last = NULL;
|
||||
for (opt = 0; opt < argc; opt++) {
|
||||
if (mods[opt] == NULL) /* smiGetModule failed above */
|
||||
continue;
|
||||
n = smiGetFirstNode(mods[opt], SMI_NODEKIND_ANY);
|
||||
if (n == NULL)
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user