errx when errno won't be set.
use reallocarray