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 Fishrock123 committed Jul 19, 2017
1 parent 5caaf83 commit 62be8ef
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 62be8ef

Please sign in to comment.