diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 6df6dbb85e..8e66be9849 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -5368,7 +5368,7 @@ class RandomBytesRequest : public AsyncWrap { error_(0), size_(size), data_(static_cast(node::Malloc(size))) { - if (data() == nullptr) + if (data() == nullptr && size > 0) FatalError("node::RandomBytesRequest()", "Out of Memory"); Wrap(object, this); } diff --git a/test/parallel/parallel.status b/test/parallel/parallel.status index 604a5b2424..f2536b6b68 100644 --- a/test/parallel/parallel.status +++ b/test/parallel/parallel.status @@ -27,11 +27,6 @@ test-debug-signal-cluster : PASS,FLAKY test-fs-watch-enoent : FAIL, PASS test-fs-watch-encoding : FAIL, PASS -# being worked under https://github.com/nodejs/node/pull/7564 -test-async-wrap-post-did-throw : PASS, FLAKY -test-async-wrap-throw-from-callback : PASS, FLAKY -test-crypto-random : PASS, FLAKY - #being worked under https://github.com/nodejs/node/issues/7973 test-stdio-closed : PASS, FLAKY