Deleted Added
full compact
59c59
< __FBSDID("$FreeBSD: head/sys/dev/amr/amr.c 143121 2005-03-04 06:11:00Z scottl $");
---
> __FBSDID("$FreeBSD: head/sys/dev/amr/amr.c 143488 2005-03-13 06:25:53Z scottl $");
474,475c474
< if ((dp = malloc(au_length, M_DEVBUF, M_WAITOK)) == NULL)
< return(ENOMEM);
---
> dp = malloc(au_length, M_DEVBUF, M_WAITOK|M_ZERO);
477,479d475
< if ((ap = malloc(sizeof(struct amr_passthrough ), M_DEVBUF, M_WAITOK)) == NULL)
< return(ENOMEM);
<
486a483,486
> /* Allocate this now before the mutex gets held */
> if (au_cmd[0] == AMR_CMD_PASS)
> ap = malloc(sizeof(struct amr_passthrough), M_DEVBUF, M_WAITOK|M_ZERO);
>
566,568c566,567
< free(dp, M_DEVBUF);
< free(ap, M_DEVBUF);
< amr_releasecmd(ac);
---
> if (ac != NULL)
> amr_releasecmd(ac);
569a569,572
> if (dp != NULL)
> free(dp, M_DEVBUF);
> if (ap != NULL)
> free(ap, M_DEVBUF);