Skip to content

Commit 44ff469

Browse files
committed
tls: fix leak on invalid protocol method
1 parent 5bd2152 commit 44ff469

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/crypto/crypto_context.cc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1355,10 +1355,7 @@ SecureContext::SecureContext(Environment* env, Local<Object> wrap)
13551355
}
13561356

13571357
inline void SecureContext::Reset() {
1358-
if (ctx_ != nullptr) {
1359-
env()->external_memory_accounter()->Decrease(env()->isolate(),
1360-
kExternalSize);
1361-
}
1358+
env()->external_memory_accounter()->Decrease(env()->isolate(), kExternalSize);
13621359
ctx_.reset();
13631360
cert_.reset();
13641361
issuer_.reset();

0 commit comments

Comments
 (0)