Commit 01f0d1ea authored by Faidon Liambotis's avatar Faidon Liambotis Committed by Guillem Jover

Add recallocarray() and freezero() from OpenBSD

Add recallocarray(), introduced in OpenBSD 6.1, and freezero(),
introduced in OpenBSD 6.2. The former is imported as-is from OpenBSD,
while the latter is the non-malloc-internal branch of the same code (and
also the OpenSSH portable variant).

Both of these originated in OpenBSD, but have also been implemented by
IllumOS, cf.

Documentation for these functions is in malloc(3) upstream, the relevant
parts of which were previously imported in reallocarray(3bsd). Update
reallocarray(3bsd) with the changes that were introduced since, and add
the relevant bits for recallocarray() and freezero(), plus aliases.

[ Update copyright in COPYING. ]

Closes: !10Signed-off-by: Guillem Jover's avatarGuillem Jover <>
parent 9c85d828
Pipeline #250208 passed with stage
in 57 seconds