]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
mips: make some use of mallocarray(9).
authorpfg <pfg@FreeBSD.org>
Mon, 15 Jan 2018 21:13:30 +0000 (21:13 +0000)
committerpfg <pfg@FreeBSD.org>
Mon, 15 Jan 2018 21:13:30 +0000 (21:13 +0000)
commit5426a059d611c1fd4b7e08b6a1bfc496480148a1
treee4c9313e295a089a0e8c4d2103958d54cd955c47
parentf35549b5edcb20b858da9b989c168877cffcd080
mips: 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/mips/mips/busdma_machdep.c
sys/mips/nlm/dev/sec/nlmrsa.c