Initialize the head pointer in kld_current_sos() to NULL to avoid returning
a junk pointer and possibly causing a seg fault if we don't have any non-kernel klds (or are unable to walk the list due to core / kernel mismatch). MFC after: 1 week
This commit is contained in:
parent
5cb64aae63
commit
834e2b5e85
@ -331,6 +331,7 @@ kld_current_sos (void)
|
||||
char *path;
|
||||
int error;
|
||||
|
||||
head = NULL;
|
||||
prev = &head;
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user