HomeFreeBSD

libc: handle zero alignment in memalign()

Description

libc: handle zero alignment in memalign()

For compatibility with glibc. The previous code would trigger a division
by zero in roundup() and terminate. Instead, just pass through to
malloc() for align == 0.

PR: 269688
Reviewed by: imp, mjg
MFC after: 1 week
Pull Request: https://github.com/freebsd/freebsd-src/pull/655

Details

Provenance
pjfloyd_wanadoo.frAuthored on Feb 24 2023, 4:29 PM
emasteCommitted on Feb 24 2023, 6:19 PM
Parents
rG07ccf71451d7: bcm_dma: don't dereference NULL softc
Branches
Unknown
Tags
Unknown