mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-27 02:42:46 +00:00
altq: Stop checking for failures from malloc(M_WAITOK)
While here, prefer malloc(M_ZERO) over bzero(). MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852
This commit is contained in:
parent
3feb35dc46
commit
2a11988663
@ -1327,12 +1327,7 @@ acc_add_filter(classifier, filter, class, phandle)
|
|||||||
return (EINVAL);
|
return (EINVAL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
afp = malloc(sizeof(struct acc_filter),
|
afp = malloc(sizeof(*afp), M_DEVBUF, M_WAITOK | M_ZERO);
|
||||||
M_DEVBUF, M_WAITOK);
|
|
||||||
if (afp == NULL)
|
|
||||||
return (ENOMEM);
|
|
||||||
bzero(afp, sizeof(struct acc_filter));
|
|
||||||
|
|
||||||
afp->f_filter = *filter;
|
afp->f_filter = *filter;
|
||||||
afp->f_class = class;
|
afp->f_class = class;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user