deal with malloc failure

Noticed by:	Coverity Prevent analysis tool
This commit is contained in:
sam 2005-03-26 21:34:12 +00:00
parent e51da39380
commit c8326b4ac6

View File

@ -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,