Coverity 1453629 and 1453638: Error handling issues (NEGATIVE_RETURNS)
Coverity 1453629 and 1453638: Error handling issues (NEGATIVE_RETURNS)

Reviewed-by: Bernd Edlinger <ac6902843ae77cc0d49b9c8ddec4cbf141db1bb7@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/9805)

openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl