kern_intr: Check for NULL event in intr_destroy()

It likely won't happen, but is consistent with the other functions of
this KPI.

Reviewed by:	imp, jhb
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D33479
This commit is contained in:
Mitchell Horne 2022-10-15 15:43:53 -03:00
parent 2af741fc53
commit 39888ed7a3

View File

@ -532,6 +532,9 @@ int
intr_event_destroy(struct intr_event *ie)
{
if (ie == NULL)
return (EINVAL);
mtx_lock(&event_lock);
mtx_lock(&ie->ie_lock);
if (!CK_SLIST_EMPTY(&ie->ie_handlers)) {