time investigating and arguing about whether a NULL fp is a bug or not,
but what has become clear is that NULL fps get passed to unp_discard
and have been for quite some time.
restore old accomodating behavior by checking for null in unp_gc.
ok deraadt kettenis
-/* $OpenBSD: uipc_usrreq.c,v 1.98 2016/07/12 13:19:14 deraadt Exp $ */
+/* $OpenBSD: uipc_usrreq.c,v 1.99 2016/07/12 14:28:02 tedu Exp $ */
/* $NetBSD: uipc_usrreq.c,v 1.18 1996/02/09 19:00:50 christos Exp $ */
/*
for (i = 0; i < defer->ud_n; i++) {
memcpy(&fp, &((struct file **)(defer + 1))[i],
sizeof(fp));
+ if (fp == NULL)
+ continue;
FREF(fp);
if ((unp = fptounp(fp)) != NULL)
unp->unp_msgcount--;