mirror of
https://github.com/opnsense/src.git
synced 2026-06-10 17:22:46 -04:00
If we're going to panic(), do it before dereferencing a NULL pointer.
Reported by: "Ted Unangst" <tedu@coverity.com> Approved by: rwatson (mentor)
This commit is contained in:
parent
a333b323e1
commit
b17dd2bcc0
1 changed files with 1 additions and 1 deletions
|
|
@ -1095,9 +1095,9 @@ unp_init(void)
|
|||
{
|
||||
unp_zone = uma_zcreate("unpcb", sizeof(struct unpcb), NULL, NULL,
|
||||
NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE);
|
||||
uma_zone_set_max(unp_zone, nmbclusters);
|
||||
if (unp_zone == 0)
|
||||
panic("unp_init");
|
||||
uma_zone_set_max(unp_zone, nmbclusters);
|
||||
LIST_INIT(&unp_dhead);
|
||||
LIST_INIT(&unp_shead);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue