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:
jhb 2008-03-29 03:48:06 +00:00
parent 5cb64aae63
commit 834e2b5e85

View File

@ -331,6 +331,7 @@ kld_current_sos (void)
char *path;
int error;
head = NULL;
prev = &head;
/*