diff --git a/sys/dev/pccard/pccard_cis.c b/sys/dev/pccard/pccard_cis.c index fce85e7c3ddc..ce5a01feda78 100644 --- a/sys/dev/pccard/pccard_cis.c +++ b/sys/dev/pccard/pccard_cis.c @@ -916,7 +916,10 @@ pccard_parse_cis_tuple(struct pccard_tuple *tuple, void *arg) if (num != state->default_cfe->number) { cfe = (struct pccard_config_entry *) malloc(sizeof(*cfe), M_DEVBUF, M_NOWAIT); - + if (cfe == NULL) { + DPRINTF(("no memory for config entry\n")); + goto abort_cfe; + } *cfe = *state->default_cfe; STAILQ_INSERT_TAIL(&state->pf->cfe_head,