Skip to content

Commit

Permalink
src: guard against double free in randomBytes()
Browse files Browse the repository at this point in the history
PR-URL: #14122
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
bnoordhuis authored and addaleax committed Jul 18, 2017
1 parent ad0669b commit e4b7019
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/node_crypto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5498,6 +5498,7 @@ class RandomBytesRequest : public AsyncWrap {
size_ = 0;
if (free_mode_ == FREE_DATA) {
free(data_);
data_ = nullptr;
}
}

Expand Down

0 comments on commit e4b7019

Please sign in to comment.