summaryrefslogtreecommitdiffstats
path: root/crypto/rand
diff options
context:
space:
mode:
authorganesh <ganeshbhambarkar@gmail.com>2016-11-11 08:43:13 +0530
committerRichard Levitte <levitte@openssl.org>2017-01-24 14:39:20 +0100
commitc2114afc1622ff0113974b3696e557ea8bf7ffb4 (patch)
treeb54b311b0aa563f7426b3ef380122388c85d759d /crypto/rand
parent3ed93c863374125296954edcbc595599adbd07ea (diff)
RAND_egd_bytes: No need to check RAND_status on connection error.
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1886)
Diffstat (limited to 'crypto/rand')
-rw-r--r--crypto/rand/rand_egd.c2
1 files changed, 2 insertions, 0 deletions
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: