From 8f4b84ba42350d2de2201d2410fd3d073c759830 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Mon, 10 Jul 2017 12:56:37 +0200 Subject: [PATCH] src: remove PBKDF2Request::release() PR-URL: https://github.com/nodejs/node/pull/14122 Reviewed-By: Anna Henningsen Reviewed-By: James M Snell --- src/node_crypto.cc | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 082b400ef4e35c..25e2ed64fa5475 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -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_; }