Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src: remove PBKDF2Request::release()
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]>
bnoordhuis authored and addaleax committed Jul 18, 2017

Verified

This commit was signed with the committer’s verified signature. The key has expired.
addaleax Anna Henningsen
1 parent b5802c7 commit 8f4b84b
Showing 1 changed file with 12 additions and 15 deletions.
27 changes: 12 additions & 15 deletions src/node_crypto.cc
Original file line number Diff line number Diff line change
@@ -5245,7 +5245,18 @@ class PBKDF2Request : public AsyncWrap {
}

~PBKDF2Request() override {
release();
free(pass_);
pass_ = nullptr;
passlen_ = 0;

free(salt_);
salt_ = nullptr;
saltlen_ = 0;

free(key_);
key_ = nullptr;
keylen_ = 0;

ClearWrap(object());
persistent().Reset();
}
@@ -5286,20 +5297,6 @@ class PBKDF2Request : public AsyncWrap {
return iter_;
}

inline void release() {
free(pass_);
pass_ = nullptr;
passlen_ = 0;

free(salt_);
salt_ = nullptr;
saltlen_ = 0;

free(key_);
key_ = nullptr;
keylen_ = 0;
}

inline int error() const {
return error_;
}

0 comments on commit 8f4b84b

Please sign in to comment.