Add checks for the return value of BIO_new() to guarantee successful
allocation, consistent with other usages.
Fixes: a412b89 ("dup_bio_* and bio_open_* are utility functions and belong in apps.c") Signed-off-by: Jiasheng Jiang <jiashengjiangcool@gmail.com> Reviewed-by: Paul Dale <ppzgs1@gmail.com> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27894)