diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 248a701cb3..b9fd2446e2 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -5498,6 +5498,7 @@ class RandomBytesRequest : public AsyncWrap { size_ = 0; if (free_mode_ == FREE_DATA) { free(data_); + data_ = nullptr; } }