deal with malloc failure

Noticed by:	Coverity Prevent analysis tool
This commit is contained in:
Sam Leffler 2005-03-26 21:34:12 +00:00
parent 4204b6b9a0
commit 2f83086184
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=144159

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,