RAND_egd_bytes: No need to check RAND_status on connection error.
authorganesh <ganeshbhambarkar@gmail.com>
Fri, 11 Nov 2016 03:13:13 +0000 (08:43 +0530)
committerRichard Levitte <levitte@openssl.org>
Tue, 24 Jan 2017 13:39:20 +0000 (14:39 +0100)
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1886)

crypto/rand/rand_egd.c

index f77af41..dd58b21 100644 (file)
@@ -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: