summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_ti.c
diff options
context:
space:
mode:
authorThomas Nordin <nordin@cvs.openbsd.org>2002-01-11 01:31:22 +0000
committerThomas Nordin <nordin@cvs.openbsd.org>2002-01-11 01:31:22 +0000
commit9f1463a8c6c1b28e4c9707469ac02a119f30e7d6 (patch)
treeb490775c6ff2c2cdc16c838a4b8d549d5a9df526 /sys/dev/pci/if_ti.c
parentd668db69c49261c2e533abf4df3ce0735530a1f8 (diff)
Check result from malloc(9) when using M_NOWAIT. fgsch@ ok
Diffstat (limited to 'sys/dev/pci/if_ti.c')
-rw-r--r--sys/dev/pci/if_ti.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/pci/if_ti.c b/sys/dev/pci/if_ti.c
index aec5e71a11e..2ed50d1e052 100644
--- a/sys/dev/pci/if_ti.c
+++ b/sys/dev/pci/if_ti.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ti.c,v 1.32 2001/12/13 23:52:15 niklas Exp $ */
+/* $OpenBSD: if_ti.c,v 1.33 2002/01/11 01:31:21 nordin Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -1071,6 +1071,8 @@ void ti_setmulti(sc)
ETHER_FIRST_MULTI(step, ac, enm);
while (enm != NULL) {
mc = malloc(sizeof(struct ti_mc_entry), M_DEVBUF, M_NOWAIT);
+ if (mc == NULL)
+ panic("ti_setmulti");
bcopy(enm->enm_addrlo, (char *)&mc->mc_addr, ETHER_ADDR_LEN);
LIST_INSERT_HEAD(&sc->ti_mc_listhead, mc, mc_entries);
ti_add_mcast(sc, &mc->mc_addr);