]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
net*: make some use of mallocarray(9).
authorpfg <pfg@FreeBSD.org>
Mon, 15 Jan 2018 21:21:51 +0000 (21:21 +0000)
committerpfg <pfg@FreeBSD.org>
Mon, 15 Jan 2018 21:21:51 +0000 (21:21 +0000)
commitbf156bc88cadb1580c43ec186e72fae88ad7e814
tree20e48df73dcb0644a8f71837e4c472f8618db39b
parentd5d345aa9e9e79db156a207b1c578120796dc336
net*: make some use of mallocarray(9).

Focus on code where we are doing multiplications within malloc(9). None of
these ire likely to overflow, however the change is still useful as some
static checkers can benefit from the allocation attributes we use for
mallocarray.

This initial sweep only covers malloc(9) calls with M_NOWAIT. No good
reason but I started doing the changes before r327796 and at that time it
was convenient to make sure the sorrounding code could handle NULL values.

X-Differential revision: https://reviews.freebsd.org/D13837
sys/net/if_vlan.c
sys/net/iflib.c
sys/netinet6/in6_jail.c