HomeFreeBSD

libjail: Handle an error from reallocarray() when trimming the buffer.

Description

libjail: Handle an error from reallocarray() when trimming the buffer.

There is no API guarantee that realloc() will not fail when the buffer
is shrinking. Handle it by simply returning the untrimmed buffer.
While this is unlikely to ever happen in practice, it seems worth
handling just to silence static analyzer warnings.

PR: 243106
Submitted by: Hans Christian Woithe <chwoithe@yahoo.com>
MFC after: 1 week

Details

Provenance
markjAuthored on
Parents
rS356475: Fix a typo - passing wrong mbuf pointer to needs_udp_csum(). Will
Branches
Unknown
Tags
Unknown