From: ganesh Date: Fri, 11 Nov 2016 03:13:13 +0000 (+0530) Subject: RAND_egd_bytes: No need to check RAND_status on connection error. X-Git-Tag: OpenSSL_1_1_1-pre1~2629 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c2114afc1622ff0113974b3696e557ea8bf7ffb4;p=oweals%2Fopenssl.git RAND_egd_bytes: No need to check RAND_status on connection error. Reviewed-by: Rich Salz Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/1886) --- diff --git a/crypto/rand/rand_egd.c b/crypto/rand/rand_egd.c index f77af415c0..dd58b21498 100644 --- a/crypto/rand/rand_egd.c +++ b/crypto/rand/rand_egd.c @@ -231,6 +231,8 @@ int RAND_egd_bytes(const char *path, int bytes) int num, ret = -1; num = RAND_query_egd_bytes(path, NULL, bytes); + if (num < 0) + goto err; if (RAND_status() == 1) ret = num; err: